Angular setup
Angular uses a command-line tool known as the Angular CLI to facilitate the creation of Angular applications and components. The Angular CLI can be installed using npm as follows:
npm install -g @angular/cli
Here we are installing the package @angular/cli
globally using npm. Once installed, the Angular CLI provides a utility named ng
, which can be used to create an Angular application as follows:
ng new angular-app
Here, we are invoking the Angular CLI and specifying that we wish to create a new angular application named angular-app
. The Angular CLI will ask a few questions when creating an application, such as whether we would like to enforce strict type checking, whether to include Angular routing, and which stylesheet format we would like to use. In this sample application, we chose Yes for strict type checking, Yes for Angular routing, and SCSS for the stylesheet format.
Once the Angular CLI has completed, let's switch to the newly created...