AppModule

As we know from Chapter 2, Looking Around, each new Component must be referenced in the AppModule so that it can be registered within our app. On top of that, we need to create the relevant entry within our RoutingModule configuration so that our users will be able to navigate to that page.

Open the /ClientApp/src/app/app.module.ts file and add the following highlighted lines:

import { BrowserModule } from '@angular/platform-browser';import { NgModule } from '@angular/core';import { FormsModule } from '@angular/forms';import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';import { RouterModule } from '@angular/router';import { AppComponent } from './app.component';import { NavMenuComponent } from './nav-menu/nav-menu.component'; ...

Get ASP.NET Core 3 and Angular 9 - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.