1<select class="custom-select" (change)="changeCity($event)" formControlName="cityName">
2 <option value="" disabled>Choose your city</option>
3 <option *ngFor="let city of City" [ngValue]="city">{{city}}</option>
4</select>
1// City Names
2 City: any = ['Florida', 'South Dakota', 'Tennessee', 'Michigan']
1import { Component } from '@angular/core';
2import { FormBuilder, Validators } from "@angular/forms";
3
4@Component({
5 // ...
6})
7
8export class AppComponent {
9
10 constructor(public fb: FormBuilder) { }
11
12 /*########### Form ###########*/
13 registrationForm = this.fb.group({
14 cityName: ['']
15 })
16
17 onSubmit() {
18 alert(JSON.stringify(this.registrationForm.value))
19 }
20
21}