Starting from scratch

Let's start out by creating a new Angular project using the Angular CLI. We'll name it mastering-angular-components:

  1. Open a console window and navigate to a proper workspace for our project. Let's use the Angular CLI to create our initial project structure:
ng new mastering-angular-components --prefix=mac
  1. After the project has been successfully created, let's move into the project folder and start serving using the ng serve command:
cd mastering-angular-componentsng serve

After following the preceding steps, you should be able to open up your browser and point it to http://localhost:4200. You should be able to see the generated application app with a welcome message saying Welcome to mac!.

It's recommended that you ...

Get Mastering Angular Components 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.