I am running Angular 11. I have not taken any action relating to updating Angular versions; I only installed one new package which is not working.
I ran npm i --save ngx-mask and it successfully installed version 15.0.2 (latest as of now), which I can verify in my package.json file.
I attempted to import the module using the following. I tried this in app.module.ts as well as in the module.ts file of the component.
import {NgxMaskModule,IConfig} from 'ngx-mask'
export const options: Partial<IConfig> | (() => Partial<IConfig>) = null;
@NgModule({
(...)
imports: [
NgxMaskModule.forRoot(options)
]
(...)
})
I am getting this error for the NgxMaskModule import
Module '"ngx-mask"' has no exported member 'NgxMaskModule'
And this error for the NgxMaskModule.forRoot(options) line in the Imports:
Value at position 55 in the NgModule.imports of AppModule is not a reference
Value could not be determined statically.(-991010)
app.module.ts(248, 5): Unable to evaluate this expression statically.
app.module.ts(248, 5): Unknown reference.
What am I doing wrong? What do I need to do in order to use ngx-mask?