https://github.com/nguyentrancong/angular-basic
Angular basic
https://github.com/nguyentrancong/angular-basic
angular css html rxjs typescript
Last synced: 3 months ago
JSON representation
Angular basic
- Host: GitHub
- URL: https://github.com/nguyentrancong/angular-basic
- Owner: nguyentrancong
- Created: 2025-02-01T02:08:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-01T02:12:28.000Z (over 1 year ago)
- Last Synced: 2025-02-17T19:18:40.348Z (over 1 year ago)
- Topics: angular, css, html, rxjs, typescript
- Language: HTML
- Homepage:
- Size: 202 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Angular CLI
###### 1. để tạo một component với template
ng generate component ten-component
ng g c ten-component
Tạo component trong một thư mục cụ thể:
ng g c folder/ten-component
Không tạo file .spec.ts (file test):
ng g c ten-component --skip-tests
Tạo component mà không có CSS (hoặc SCSS, SASS, LESS):
ng g c ten-component --skip-styles
###### 2. Tạo Pipe bằng Angular CLI
ng generate pipe ten-pipe
ng g p ten-pipe
src/app/ten-pipe.pipe.ts
src/app/ten-pipe.pipe.spec.ts (file test, có thể xóa nếu không cần)
Mở file ten-pipe.pipe.ts và chỉnh sửa như sau: