AnswerListComponent

After all we did with the questions, implementing the answer-related components will be a walk in the park! Jokes aside, this is pretty much the same code with some minimal differences. As a matter of fact, it will be even easier, as we won't have to struggle with child components; we'll just need to implement the ngOnChanges() life cycle hook again, since we have no parent changes to detect.

Anyway, here's the deal: from Solution Explorer, create the /ClientApi/app/components/answer/ folder and right-click on it to add the following answer-list.component.ts class file:

import { Component, Inject, Input, OnChanges, SimpleChanges } from "@angular/core";import { Router } from "@angular/router";import { HttpClient } from ...

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.