I have been following some user guides / introduction videos, and am struggling to merge a couple of very basic concepts. I have trying to populate a SELECT using the ng-options but it seems its entirely ignored, and appears in the final HTML
I have appponent.html:
Please pick an option
<select ng-options="x for x in myData">
I have apppontents.ts:
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './appponent.html',
styleUrl: './appponent.css'
})
export class AppComponent implements OnInit {
myData = ['Yes', 'No'];
constructor() {}
ngOnInit(): void {}
}
Its as though ng-options and ng-repeat is not a thing - I can type any old rubbish into them and it just outputs to the HTML