Chủ Nhật, 17 tháng 4, 2022

Note Angular


1. Setup

 - Cài đặt npm, nodejs, nvm

 - Cài Angular CLI: 

npm install -g @angular/cli


2. Các lệnh terminal

- Tạo app: 

ng n tenApp | ng new tenApp

- Run app: 

    ng s | ng serve

    ng s --open

    ng s --port 4211

    ng s --port 4211 --disable-host-check

- Tạo component: 

ng g c ten-component | ng generate component ten-component

- Tạo service: 

ng g service ten-service

- Tạo file routing trong module: 

ng g m ten-module --routing | ng generate module ten-module --routing

- Tạo class: 

ng g class ten-class

- Tạo interface: 

ng g interface ten-interface




Không có nhận xét nào:

Đăng nhận xét