

Angular - Component
Presentation
•
Professional Development
•
University
•
Hard
Pedona HoangVQ
Used 1+ times
FREE Resource
10 Slides • 0 Questions
1
Component là gì?
- Ứng dụng được dựng lên bởi nhiều component
- Mỗi component đóng vai trò là một phần hiển thị nhỏ trong view (1 khối trên view ~ section)
2
Ứng dụng tạo bởi những thành phần gì?
- Thành phần ứng dụng
- Layout: Html, Css
- Tập hợp các component
3
Các component được quản lý bởi...
App Module
4
Các thành phần của Component
- Template: Layout, css, directive(hàm, công thức)
- Metadata
- Component class ( Logic, Property, Method )
5
Cấu trúc của Component
- File Class Component
- File Html hiển thị view
- File Css để trang trí
- File spect.ts để viết các test case
6
File Class Component
Component sẽ có một Class để chúng ta liên kết với View. Các Class này được tạo ra bằng TypeScript. Class có chứa và định nghĩa các thuộc tính và phương thức, cũng tương tự như định nghĩa Class của lập trình hướng đối tượng.
7
File Html hiển thị view
Template HTML khai báo những gì component hiển trị trên trang
Một mẫu (template) cái mà sẽ tạo ra giao diện (layout view) cho người dùng, template này được tạo ra từ HTML. Trên trang HTML này, chúng ta sẽ sử dụng Angular Binding và Directives để tăng sức mạnh cho View.
8
Metadata
Thành phần không thể thiếu của Component
Cung cấp thông tin bổ sung cho Angular Component và giúp định nghĩa Class này như một Angular Component. Metadata được định nghĩa bởi một Decorator. Một decorator có thể hiểu đơn giản là phương thức thêm Metadata vào Class
9
Vòng đời của Component
Được quản lý bởi Angular
Khởi tạo -> Render -> Khởi tạo và render các component con -> Ghi nhận thay đổi thuộc tính của nó -> Hủy khi không sử dụng
10
Life Circle Hooks
"Mỏ neo" Mục đích và thời điểm của vòng đời Component
Được tính từ lúc tạo ra, thay đổi và bị phá hủy
Thứ tự
Contructor
ngOnChanges -> ngOnInit -> ngDoCheck -> ngAfterContentInit -> ngAfterContentChecked -> ngAfterViewInit -> ngAfterViewChecked -> ngOnDestroy
Component là gì?
- Ứng dụng được dựng lên bởi nhiều component
- Mỗi component đóng vai trò là một phần hiển thị nhỏ trong view (1 khối trên view ~ section)
Show answer
Auto Play
Slide 1 / 10
SLIDE
Similar Resources on Wayground
7 questions
Power Series
Presentation
•
University
7 questions
Chapter 13
Presentation
•
University
7 questions
Research in Education (Ethics)
Presentation
•
University
7 questions
easy math for you
Presentation
•
KG - 2nd Grade
6 questions
Required_BHS Staff_District Resources_Website
Presentation
•
University
9 questions
Learning Design BUILDS Analysis
Presentation
•
University
6 questions
Helyos Sharing Time
Presentation
•
Professional Development
8 questions
Quizizz PD sample lesson
Presentation
•
Professional Development
Popular Resources on Wayground
6 questions
Secondary Safety Quiz
Presentation
•
9th - 12th Grade
10 questions
MyPath Diagnostic Overview
Presentation
•
6th - 8th Grade
20 questions
Lab Safety Quiz
Quiz
•
6th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Adding and Subtracting Decimals
Quiz
•
5th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
21 questions
Lab Safety
Quiz
•
10th Grade
Discover more resources for Professional Development
20 questions
Disney Trivia
Quiz
•
University
20 questions
Brand Trivia
Quiz
•
9th Grade - University
10 questions
Would you rather...
Quiz
•
KG - University
21 questions
Mapa países hispanohablantes
Quiz
•
1st Grade - University
10 questions
Spanish Greetings and Goodbyes!
Presentation
•
6th Grade - University
12 questions
CE 2b Early Documents Review
Quiz
•
7th Grade - University
30 questions
Multiplying and Dividing Integers
Quiz
•
6th Grade - University
13 questions
Back to School
Quiz
•
KG - University