Angular

angular

Get Started. It's Free
or sign up with your email address
Angular by Mind Map: Angular

1. Cơ bản

1.1. component

1.1.1. KHái niệm

1.1.1.1. 1 component điều chỉnh 1 thành phần của màn hình (view)

1.1.1.2. giúp dễ quản lý, tái sử dụng

1.1.2. Cấu trúc

1.1.2.1. metadata

1.1.2.1.1. selector

1.1.2.1.2. templateUrl

1.1.2.1.3. styleUrl

1.1.2.2. template

1.1.2.3. component class

1.1.3. data binding

1.1.3.1. {{value}}

1.1.3.2. [property]="value"

1.1.3.3. (event)=handler

1.1.3.4. [(ng-model)] = "property"

1.1.4. tao component

1.1.4.1. ng g c component-name

1.1.4.2. ng generate create component-name

1.1.5. parent-children

1.1.5.1. Input

1.1.5.2. Output

1.2. directive

1.2.1. đưa ra chỉ dẫn để angular chuyển đổi template thành DOM

1.2.2. Phân loại

1.2.2.1. component = directive + template

1.2.2.2. attribute directive

1.2.2.3. structure directive

1.3. pipe

1.3.1. chuyển đổi dữ liệu để hiển thị sao cho người dùng hiểu được

1.3.2. {{value | pipe}}

1.4. service

1.4.1. một class đóng gói các chức năng con cho các phần còn lại của ứng dụng sử dụng

1.4.2. component cần nhúng để dùng

1.4.3. ng g s service-name

1.5. router

1.5.1. chuyển view này qua view khác

1.5.2. cú pháp: {path: 'url', component: componentName }

1.6. guard

1.7. module

1.7.1. tổ chức úng dụng thành các chức năng riêng biệt

2. MVVM

2.1. View

2.1.1. giao diện ứng dụng

2.1.2. có thể thực hiện hành vi, phản hồi người dùng

2.1.3. nằm trong template

2.2. Model

2.2.1. truy suất, thao tác dữ liệu

2.2.2. là thành phần của component class

2.3. View/model

2.3.1. quản lý view và model

2.3.2. Để xử lý truy suất dữ liệu, thao tác trên view

3. UI/UX

3.1. F-pattern

3.1.1. dùng cho web nhiều text

3.2. Z-pattern

3.2.1. Không nhấn mạnh text

3.3. tham khảo: ui-pattern.com

3.4. tìm kiếm: ux best practice

4. Angular Form

4.1. template-driven form

4.1.1. Sủ dọng cho form đơn giản

4.1.2. Dùng FormsModule

4.1.3. Bản chất là bất đồng bộ

4.2. Reactive form

4.2.1. dùng cho Form phức tạp

4.2.2. Dùng ReactiveFormsModule

4.2.2.1. FormGroup

4.2.2.2. FormBuilder

4.2.2.3. FormControl

4.2.2.4. FormArray

4.2.3. hầu hết là đồng bộ

4.3. Validators

4.4. ngSubmit

5. Tổng quan

5.1. Khái niệm

5.1.1. Là một javaScript framework cho front-end

5.1.2. Phân loại

5.1.2.1. angularJS viết bằng javascript

5.1.2.2. angular viết bằng TypeScript

5.2. Ứng dụng:

5.2.1. thiết kế single-page apps

5.2.2. Không load lại trang web khi sử dụng

5.3. Ưu điểm

5.3.1. Nâng cao năng suất lập trình

5.3.2. Có cấu trúc phát triển rõ ràng

5.3.3. kết nối dữ liệu dễ dàng

5.3.4. cộng đồng lớn

5.4. TypeScript

5.4.1. kiểu dữ liệu Typescrip

5.4.1.1. boolean

5.4.1.2. number

5.4.1.3. string

5.4.1.4. array

5.4.1.5. tuple

5.4.1.6. enum

5.4.1.7. void

5.4.1.8. interface

5.4.1.9. null

5.4.1.10. undifine

5.4.1.11. any

5.4.2. superset của javascript

5.4.3. promise

6. angular CLI

6.1. npm install -g @angular/cli

6.2. ng new project-name

6.3. ng s -o

7. Cấu trúc thư mục

7.1. e2e : chứa test

7.2. node-module: chứa module nodeJS cần thiết

7.3. src: chứa source code

7.3.1. app

7.3.1.1. app.component.ts

7.3.1.2. app.module.ts

7.3.1.3. app.component.html

7.3.2. assets

7.4. package.json

7.5. index.html

8. bootstrap

8.1. cài đặt

8.1.1. npm install bootstrap --save

8.1.2. npm install jquery --save

8.1.3. npm install popper.js --save

8.1.4. angular.json

8.1.4.1. "styles": [ "node_modules/bootstrap/dist/css/bootstrap.min.css", "src/styles.scss" ],

8.1.4.2. "scripts": [ "node_modules/jquery/dist/jquery.min.js", "node_modules/bootstrap/dist/js/bootstrap.min.js" ]

8.2. dùng CDN, dán link vào index

9. Kết nối backend

9.1. API

9.2. dùng HttpClientModule

9.3. method

9.3.1. get

9.3.2. post

9.3.3. put/patch

9.3.4. delete

9.4. chú ý

9.4.1. Observable

9.4.2. subscribe

9.4.3. unsubscribe