Trying to use
https://github.com/text-mask/text-mask/tree/master/addons#createnumbermask
Uncaught Error: Template parse errors:
Can't bind to 'textMask' since it isn't a known property of 'input'. ("lex="18" fxFlexOffset="1">
<input [ERROR ->][textMask]="{mask: numberMask}" type="text" [(ngModel)]="myModel" ):
I am using
"angular2-text-mask": "^8.0.4",
"text-mask-addons": "^3.7.1",
"text-mask-core": "^5.0.1",
Imported in my Module
imports: [
BrowserModule,
FormsModule,
TextMaskModule
]
trying to use in my component
numberMask = createNumberMask({
prefix:'',
suffix:'',
allowDecimal: true
})
my html
<md-input-container fxFlex="18" fxFlexOffset="1">
<span mdPrefix>{{currencySymbol}} </span>
<input [textMask]="{mask: numberMask}" type="text" [(ngModel)]="myModel" mdInput >
<md-error>This field is required</md-error>
</md-input-container>