For some reason, I am suddenly getting this error out of the blue, with no code changes. Any ideas what would be causing this?
I was able to solve this with adding NgbModule.forRoot()
to my imports,
but now I get this error:
Property 'forRoot' does not exist on type 'typeof NgbModule'.
the application is running fine otherwise.
I've got the same problem with you. I tried to add .forRoot() to NgbModule. Try to configure your @NgModule decorator like this:
imports: [ BrowserModule, FormsModule, HttpModule, RouterModule.forRoot(appRoutes), NgbModule.forRoot() ]
Hope this help.
adding this one on my modules.ts works!
imports: [
NgbModule.forRoot()
]
For Angular 8, Make sure you have added NgbModule in app.module.ts imports: [ BrowserModule, FormsModule, HttpModule, RouterModule.forRoot(appRoutes), NgbModule // .forRoot() is deprecated in Angular 8 ]
And Downgrading "ng-bootstrap" to 5.x.x worked for me. I found the Angular ng-bootstrap compatibility here. https://www.npmjs.com/package/@ng-bootstrap/ng-bootstrap
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With