I am using angular2-materialize with materialize-css to work with angular2. Everything works fine even the normal select component . the problem is with multiple select it doesn't render the dynamic values , I don't understand if its the issue with the initializing object or something else as it works for a normal select but if i add static options and after rendering if I click that option then change event is called and then if I click it again all those dynamic values gets added to the combo.
Below is my code but if there is not any proper solution i can work with any workaround or any other framework than materialize-css which is tested and works proper with angular2.
<div class="form-group">
<!--if i remoe multiple it works-->
<select
materialize="material_select"
multiple
(ngModelChange)="change($event)"
[ngModel]="prodmodel.CategoryId"
ngControl="CategoryId" #catid="ngForm">
<!--This options are not rendering-->
<option *ngFor="#p of categories"
[value]="p.id">
{{p.CategoryTitle}}
</option>
<!--This option will render and if i click it above options will render too but not in oproper way-->
<option value="0">chhose</option>
</select>
<label>select Category </label>
</div>
My function to get categories:
getCategories() {
this._Categories.getCategories()
.subscribe(
Categories=> this.Categories= Categories,
error => this.errorMessage = <any>error);
}