Binding select element to object in Angular

后端 未结 14 1506
走了就别回头了
走了就别回头了 2020-11-22 02:41

I\'d like to bind a select element to a list of objects -- which is easy enough:

@Component({
   selector: \'myApp\',
   template: `

My Application&

14条回答
  •  旧巷少年郎
    2020-11-22 03:44

    Just in case someone is looking to do the same using Reactive Forms:

    Selected Country: {{country?.name}}

    Check the working example here

提交回复
热议问题