I know that similar questions have been asked, but I\'ve found none with a good answer. I want to create a select list in an Angular form, where the value for each option is
HTML:
Select {{year.value}}
TS:
years = new FormControl(''); yearsList = [{id: 1, value: '2019'}, {id:2, value: '2020'}];
this.years.valueChanges.subscribe((year) => { console.log(year) });
RESULT: you will get year object in console :)