@Input()count:number=5;@Output()countChange=newEventEmitter();change{this.count++;this.countChange.emit(this.count);}[(conut)]="conut"这个会报错Can'tbindto'conut'sinceitisn'taknownpropertyof'app-child-component'.1.If'app-child-component'isanAngularcomponentandithas'conut'input,thenverifythatitispartofthismodule.2.If'app-child-component'isaWebComponentthenadd'CUSTOM_ELEMENTS_SCHEMA'tothe'@NgModule.schemas'ofthiscomponenttosuppressthismessage.3.Toallowanypropertyadd'NO_ERRORS_SCHEMA'tothe'@NgModule.schemas'ofthiscomponent.
相关分类