Angular 4 Setup
Angular 4 is faster than angular 2.
npm install -g @angular/cli //command to install angular 4 ng new Angular 4-app // name of the project cd my-dream-app ng serve
then you run the Angular CLI command.
The installation process will start and will take a few minutes to complete.
We have also used -g to install Angular CLI globally Type ng -v
To create a project in Angular 4, we will use the following command −
We will use Visual Studio Code IDE for working with Angular 4; you can use any IDE, i.e., Atom, WebStorm, etc.
To download Visual Studio Code, go to https://code.visualstudio.com/ and click Download for Windows.
after install look like this
We have not started any project in it. Let us now take the project we have created using angular-cli.
We will consider the Angular 4-app project. Let us open the Angular 4-app and see how the folder structure looks like.
type command ng serve
Once you run http://localhost:4200/ on browser You can change the port if you wish using the following command −
ng serve --host 0.0.0.0 –port 4205