Build simple Angular 4 application using the Angular CLI

  • Install Angular CLI, Node.js and npm to set up the development environment. Refer the below post to set up the environment.

How to install Angular CLI?

  • Create a new workspace and generate a new sample application by running the following command in command prompt
ng new {appName}

angular sample app

Get your popcorn’s as it takes some time to install the npm packages.

  • To serve the application go to the project directory and run the command
ng serve --open

ng serve

–open option opens your browser on http://localhost:4200/

Sample app

2 comments

Join Discussion

This site uses Akismet to reduce spam. Learn how your comment data is processed.