

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
8 questions
h10 (htr 8) deel 5 b: 3 auto's in >, voorrang aan rechts
Presentation
•
Professional Development
9 questions
first day
Presentation
•
University
7 questions
unittest
Presentation
•
University
8 questions
ÔN TẬP TỪ CHỦ ĐỀ 1 ĐẾN CHỦ ĐỀ 9 HÌNH HỌC 8
Presentation
•
University
6 questions
Meet the teacher (Lesson)
Presentation
•
Professional Development
6 questions
Strategies for Students with Disabilties
Presentation
•
Professional Development
8 questions
Essay Structure Lesson
Presentation
•
University
8 questions
VSTE Demo Booth 2023
Presentation
•
Professional Development
Popular Resources on Wayground
20 questions
Math Review
Quiz
•
3rd Grade
15 questions
Fast food
Quiz
•
7th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
10 questions
Identify Fractions, Mixed Numbers & Improper Fractions
Quiz
•
3rd - 4th Grade
Discover more resources for Professional Development
20 questions
Guess The App
Quiz
•
KG - Professional Dev...
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
19 questions
Minecraft
Quiz
•
6th Grade - Professio...
40 questions
8th Grade Math Review
Quiz
•
8th Grade - University
20 questions
Block Buster Movies
Quiz
•
10th Grade - Professi...
10 questions
Would you rather...
Quiz
•
KG - University
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...
14 questions
Superhero
Quiz
•
1st Grade - University