Binding for html select giving me problems if I use property type name for ngModel in Angular 2 -


if use type name binding doesn't set default option select in angular 2.

<select  (change)="changedfilter()" [(ngmodel)]="dropdownsselected.type" name="type" class="form-control">    <option *ngfor="let type of dropdowns.types" [value]="type">{{type}}</option>   </select> 

however if change 'type' 'tipo' works:

  <select  (change)="changedfilter()" [(ngmodel)]="dropdownsselected.tipo" name="tipo" class="form-control">    <option *ngfor="let tipo of dropdowns.tipos" [value]="tipo">{{tipo}}</option>   </select> 

do know if angular 2 has kind of incompatibility type name property?

to knowledge type reserved angular 2 keyword might not work.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -