77 words
1 minutes
[Angular] #1 Starting Angular
cd ~/.ssh/ touch config open config
Install Angular CLI
sudo npm inatall -g @angular/cli@lastest
How to start project
- Create project
ng new first-app - Activate project
cd -first-app ng serve - See
http://localhost:4200
Angular setting
Initial location
- Open
angular.json - See first startup files about index and browser
"index": "src/index.html", "browser": "src/main.ts",
Module location
- See
src/main.tscan know modules are insrc/app/
Component location
- See
src/app/app.component.tscan know initial components
Modify First Page
- Open
src/app/app.component.html - Delete all thing!
- Add html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Start Angular</title> <link rel="stylesheet" href="app.component.css"> </head> <body> Hi there </body> </html>
