Angular
Building a CRUD Application with Angular & ASP.Net Core - Creating our Frontend Angular App

Using the CLI to generate our Angular App

PRO

Using the CLI to generate our Angular App

In this video we used the Angular CLI to generate our components. The CLI makes it easy to start building Angular apps and helps you follow best practices. You will want to become familiar with the CLI as it makes creating Angular apps very easy.

Commands Used

ng new CampTrackerAngular

This command will build a brand new Angular application named CampTrackerAngular

  • ng is what we preface all Angular CLI commands with
  • new indicates that we want to create a brand new Angular app
  • CampTrackerAngular is the name of the application that we would like to create

ng g c camp-list

This command will generate a camp-list component for us.

  • ng is what we preface all Angular CLI commands with
  • g indicates that we want generate something new
  • c is short-hand for component, that is what we want to generate
  • camp-list is the name of the component that we want to generate

ng serve -o

This command builds and serves up our application. The -o option tells the command to open our default browser once complete. If we keep this running it will continue to rebuild and serve up our application when any file changes are made.

More info on the commands above can be found in the Angular CLI documentation.