InfomediaLtd / angular2-materialize

Angular 2 support for Materialize CSS framework.
https://infomedialtd.github.io/angular2-materialize/
MIT License
407 stars 140 forks source link

Can't bind to 'ngForFrom' since it isn't a known property of 'option' #362

Open maurocappe opened 7 years ago

maurocappe commented 7 years ago

i am trying to fill a select using an array i bring from an in memory api server, but i cant make the ngfor work. `<select materialize="material_select" [materializeSelectOptions]="tiposLocacion" id="tipo" #tipo> <option *ngFor="let tipo from tiposLocacion" [value]="tipo.ID_TipoLocacion">{{tipo.Nombre}}

` thats the html. `export class NuevaLocacionComponent implements OnInit { constructor(private locacionService: LocacionService) { } tiposLocacion: TipoLocacion[]; ngOnInit() { setTimeout(() => initialize(), 300); this.locacionService.getTiposLocacion().then(tipos => this.tiposLocacion = tipos); } }`
holzeis commented 7 years ago

Try to use *ngFor="let option tipo of tiposLocation"

https://stackoverflow.com/questions/40595345/exception-template-parse-errors-cant-bind-to-ngforfrom-since-it-isnt-a-kno

rubyboy commented 7 years ago

@maurocappe did this work?

Abhishek2kr commented 5 years ago

I did the same mistake like I used "let user from users", After changing from to of like "let user of users" worked.