The scenario:
We have a production Angular app that uses many libraries, including: ng-select, angular-fontawesome, ng2-charts, ngx-quill, ng-bootstrap and so on... nothing out of the orginary.
For some reason, ng-bootstrap in particular(and a few other smaller libraries) are giving an issue in VS Code: Every single component / directive from the library shows an error that it can't be found:
Example of using ngbNav:
<ul ngbNav #nav="ngbNav" [(activeId)]="active" class="nav-tabs">
</ul>
The issue:
VS Code shows red with errors that it's basically not valid:
Can't bind to 'activeId' since it isn't a known property of 'ul'
and:
There is no directive with "exportAs" set to "ngbNav"
And yes, NgbModule is imported in app.module.ts
imports: [
CommonModule,
FormsModule,
BrowserModule,
AppRoutingModule,
HttpClientModule,
RouterModule,
BrowserAnimationsModule,
NgbModule,
...
]
One thing that's maybe (somewhat) non-standard is that we have heavy use of lazy-loaded modules within our application.
However, in those "sub" modules that use these components, we have NgbModule imported as well, in the <module-name>.module.ts files.
The strangeness:
The App itself works fine: Local development has no compilation errors, all of the ng-bootstrap components work flawlessly, Lint and Unit tests run fine, the App builds successfully and no issues in production.
This leads me to think that it may be a VS Code eslint or angular language service issue but I've tried re-installing every possibly related extension with no joy.
The question:
Does anyone know what would cause this and how to remedy? It's not a showstopper but having the editor be valid helps with debugging and exploring usage of the libraries.
