1. Download and install Node Package Manager(npm)
Link to download npm (https://nodejs.org/en/download/)
2. Then install ANGULAR CLI globally
Open cmd and Run command
1 |
> npm install -g @angular/cli |
It can install angular globally
3. To Check version on command
1 |
> node -v |
1 |
> npm -v |
1 |
> ng -v |
4. Create new project
Open terminal and run command
1 |
> ng new my-app |
Here we create project name my-app
Angular cli installs npm packages and creates project files
5. Run project
Open command prompt and run following command
1 2 |
> cd my-app > ng serve --open <strong>OR</strong> > ng serve -o |
ng serve lunch server and rebuild the app
Using –open or just -o you automatically open browser on http://localhost:4200/