Issue
After installed angular-autofocus-fix
imported the AutofocusModule
When i run the angular projects its shows below error:
ERROR in node_modules/angular-autofocus-fix/index.d.ts:4:23 - error TS2314: Generic type 'ModuleWithProviders<T>' requires 1 type argument(s).
static forRoot(): ModuleWithProviders
When i check in that node_mudule
I am using angular 10 in my project.
Solution
By adding this below given code snippet in app.module.ts
fixed the issue
declare module "@angular/core" {
interface ModuleWithProviders<T = any> {
ngModule: Type<T>;
providers?: Provider[];
}
}
@NgModule({
// ......
})
export class AppModule { }
In my case, this problem happened when I upgraded ng-bootstrap
version in angular-10
.
Answered By - WasiF
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.