Adding the component

Our second Angular component is ready; let's add it to our Angular app and test it.

Open the app.module.shared.ts file and add the required references (new lines are highlighted):

[...]import { HomeComponent } from './components/home/home.component';import { QuizListComponent } from './components/quiz/quiz-list.component';import { QuizComponent } from './components/quiz/quiz.component';@NgModule({    declarations: [        AppComponent,        NavMenuComponent,        HomeComponent,        QuizListComponent,        QuizComponent    ],[...]

Then, open the quiz-list.component.html file and append the <quiz> pseudo-element in the following way (new lines highlighted):

<h2>{{title}}</h2><ul class="quizzes">    <li *ngFor="let quiz of quizzes" [class.selected]="quiz ...

Get ASP.NET Core 2 and Angular 5 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.