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


One comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s