Generating a New Application

Now that we have installed and configured Angular CLI, we can start generating our new application.

Running the ng new command will do the following:

  • Create a folder called angular-social
  • Create a new basic application inside this folder
  • Add a routing module (because the --routing flag is passed in)
  • Run npm install inside this folder to install the dependencies
  • Run git init to initialize a new Git repository

Creating a New Application

To create a new application, perform the following steps:

  1. Open your terminal and navigate to the directory where you want to work on your application:
    cd dev
  2. Once inside your workspace directory, invoke the ng command as follows:
    ng new angular-social --routing
  3. The output of this command will be similar ...

Get Beginning Server-Side Application Development with Angular now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.