amarkes / br-mask

MIT License
116 stars 56 forks source link

Can't bind to 'brmasker' since it isn't a known property of 'ion-input'. #14

Open garauz23 opened 5 years ago

garauz23 commented 5 years ago

I added on app.module.ts import { BrMaskerModule } from "br-mask";

@NgModule({ declarations: [AppComponent], entryComponents: [], imports: [ ... , BrMaskerModule ],...

but i still getting the following message: Can't bind to 'brmasker' since it isn't a known property of 'ion-input'.

vinicius-santos commented 5 years ago

I added on app.module.ts import { BrMaskerModule } from "br-mask";

@NgModule({ declarations: [AppComponent], entryComponents: [], imports: [ ... , BrMaskerModule ],...

but i still getting the following message: Can't bind to 'brmasker' since it isn't a known property of 'ion-input'.

Use this, but not in the module module class, but in the module where you will use the mask

imports: [ BrMaskerModule ],

providers: [ StatusBar, BrMaskDirective

],

garauz23 commented 5 years ago

I added on app.module.ts import { BrMaskerModule } from "br-mask"; @NgModule({ declarations: [AppComponent], entryComponents: [], imports: [ ... , BrMaskerModule ],... but i still getting the following message: Can't bind to 'brmasker' since it isn't a known property of 'ion-input'.

Use this, but not in the module module class, but in the module where you will use the mask

imports: [ BrMaskerModule ],

providers: [ StatusBar, BrMaskDirective

],

I undestand, I dont need to added to app.module.ts, I just need to add BrMaskerModule as import and BrMaskDirective as provider on mypage.module.ts,

Am I correct?

kapilraghuwanshi commented 5 years ago

Yes, just add directive and module in your own sub module not in app.module.ts. It is working.