First we need to setup the development environment for Angular 2 & Angular 4 before coding.
This command will take some time to create a new project so please wait.
STEP 4:
ng serve launches the server ,continuously monitors your files and if you make any changes in your project files it rebuilds the app .
--open or -o will open your browser on http:/localhost:4200/.
For stop this ng serve press Ctrl+C and y in terminal.
STEP 1:
- If your system does not have NodeJs and npm then install NodeJs and npm.
- In a terminal or console window enter node --v and npm --v to verify is it installed or not.
- Check at least node in the version of 6.9.x.
STEP 2:
- After the installation process of node,Install Angular CLI globally.
- In terminal or console window and run the following command.
npm install -g @angular/cli
STEP 3:- Create an project by running the following commands in terminal.
ng new myNewApp
- And then open the project directory in terminal and run the following command.
cd my-app
ng serve --open
Comments
Post a Comment