Frontend State Management with Angular and NGRX : Getting started with Angular and Testing your connection to the API

Getting started with Angular and Testing your connection to the API

When working with Angular, it is advisable to first install the Angular CLI.  The Angular CLI is a command-line interface tool that you use to initialize, develop, scaffold, and maintain Angular applications directly from a command shell.

The command for installing the CLI for both yarn and npm are shown below. 

// When working with yarn
yarn add -g @angular/cli

// When working with npm
npm install -g @angular/cli

As at the time of doing this tutorial, the Angular CLI requires a minimum Node.js version of either v10.13 or v12.0.  If you run into problems with this compatibility issue, you can check out this page for some guidance. 

After installing the CLI, we can generate a new angular application and start building on the next big news site. 

// Generate new Angular Application
ng new fnn-angular-base

// Change directory
cd fnn-angular-base

Now in our application directory, we can run to run and open our brand new application in the browser.

ng serve --open

 

 


course logo
Frontend State Management with Angular and NGRX
Number of sections:
12
Content length:
Delivery formats:
Frontend State Management with Angular and NGRX