ng serve to serve the angular application


  • Node 6.9.0 or higher
  • NPM 3 or higher
  • Angular CLI
  • Create a new workspace and generate a new sample application by running the following command in command prompt

ng new {appName}

  • To serve the application go to the project directory and run the command as shown below:

ng serve --open

The ng serve command builds the app, starts the development server, 
watches the source files, and rebuilds the app as you make changes 
to those files.

The --open flag opens a browser to http://localhost:4200/

You should see the app running in your browser.

Now we have finished creating and running the application, lets see how to configure an Angular component using Angular CLI

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s