Angular CLI installation and creating sample application
Read this document and follow the steps to install and create Angular CLI sample application.
- Before installing Angular Cli, we need to install nodejs latest version download from nodejs.org. Click on this link to follow the spets to instal nodejs
- To know nodejs installed or not you can execute this commands in the terminal
- node –v
- npm –v
- Once conformed nodejs installed properly. Execute the below command in terminal to install Angular Cli.
- npm install –g @angular/cli
- You can get the above command from angular cli website. (https://cli.angular.io/)
- This will take a while to complete the installation. You will see the below screen once installation completed.
- To check whether angular cli installed properly or not, go to the terminal and execute the below command.
- ng -v
- You will see the below screen as the response of the above command execution.
- Now we are good to go to work in angular cli.
- Next, we need to create the angular cli project with the below command.
- ng new angular-cli-app
- You can see the progress of installing the packages into the angular-cli-app project. It will take some time to install the packages.
- Once the project creation completed, you can change the directly into the project name with the command of CD.
- cd angular-cli-app
- Now, start the application by using the below command.
- ng serve
- Once application started, we can access with this link http://localhost:4200/. By default port number will be 4200.
Difference between AngularJS and Angular
ReplyDelete