{
"resource": "/c:/Users/Karthick_Aadhi/example/src/app/app.module.ts",
"owner": "typescript",
"code": "2339",
"severity": 8,
"message": "Property 'forRoot' does not exist on type 'typeof NgbModule'.",
"source": "ts",
"startLineNumber": 15,
"startColumn": 15,
"endLineNumber": 15,
"endColumn": 22
}
But it is giving error "Property 'forRoot' does not exist on type 'typeof NgbModule'."
The error "Property 'value' does not exist on type 'HTMLElement'" occurs when we try to access the value property on an element that has a type of HTMLElement. To solve the error, use a type assertion to type the element as HTMLInputElement before accessing the property.
1 NgbModule.forRoot()is used in a very old version of ng-bootstrap with an old version of Angular (I think that in Angular 6 and ng-bootstrap 2.0). Check the version of ng-bootstrap you're using
The "Property does not exist on type ' {}'" error occurs when we try to access or set a property that is not contained in the object's type. To solve the error, type the object properties explicitly or use a type with variable key names. Copied!
Importing any ng-bootstrap module via .forRoot() has now been completely removed since 5.0.0-rc.0
Change
NgbModule.forRoot()
To
NgbModule
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