问题
Hello everyone when i'm compile my app in prod release i got an error
Can't bind to 'ngModel' since it isn't a known property of 'ion-select'.
My code
<ion-select #sel1 [(ngModel)]="Selectedcat" (ngModelChange)="onChange()" >
i make this configuration in appmodule :
imports: [
BrowserModule,
HttpModule,
Ionic2RatingModule ,
FormsModule,
IonicModule.forRoot(MyApp),
IonicStorageModule.forRoot(),
IonicImageLoader.forRoot()
]
thanks for yours help
回答1:
I solved my problem
the problem was because I use in a component so you need to add in components.modules.ts imports: [IonicModule],
that's all
来源:https://stackoverflow.com/questions/48674657/cant-bind-to-ngmodel-since-it-isnt-a-known-property-of-ion-select