Creating Angular Application

Angular cli commands can be used to create the template of a new angular application. 

To create a new angular application, use ng new command as follows

    ng new <<appname>>

Example:

    ng new sample 

Here sample is the name of the new application. 

You will be asked a series of questions:

* Would you like to add angular routing?

For the basic example, we can choose No

* Which stylesheet format would you like to use?

  • SCSS
  • CSS
  • LESS
  • SASS

I chose Css for now. 

Angular app will then be created and the dependent packages are installed. 

To install dependent packages manually, use the following npm command. 

        npm install

Once the application is created and dependencies are installed, run the application with the following npm command

       npm run start 

Browse to https://localhost:4200 to see the application.  

Leave a comment