Extending the CityEditComponent

Open the /ClientApp/src/app/cities/city-edit.component.ts file and add the following code (the new/updated lines are highlighted):

import { Component, Inject } from '@angular/core';import { HttpClient } from '@angular/common/http';import { ActivatedRoute, Router } from '@angular/router';import { FormGroup, FormControl } from '@angular/forms';import { City } from './City';@Component({  selector: 'app-city-edit',  templateUrl: './city-edit.component.html',  styleUrls: ['./city-edit.component.css']})export class CityEditComponent {  // the view title  title: string;  // the form model  form: FormGroup;  // the city object to edit or create  city: City;  // the city object id, as fetched from the active route: // It's NULL ...

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.