vscode-ng-language-service: bug: transitive NgModule exports not being found
Versions:
- Angular Language Service: 0.0.10
- angular-cli: 1.0.0-beta.24
- node: 6.9.1
- os: darwin x64
- @angular/*: 2.4.1
It seems that exports from modules that are imported into the main AppModule
are not being picked up correctly.
See the following gist: https://gist.github.com/petebacondarwin/9fb71ae5efd2ad1567938db1350f5a9f
In this example the BangPipe
is being declared and exported from the SharedModule
, which is then being imported into AppModule
, which contains the AppComponent
. The AppComponent
is using the BangPipe
in its template.
Putting this inside a vanilla Angular CLI generated project will build (with --prod
and --aot
flags) successfully but VS Code is reporting that this pipe is not found.
Declaring the BangPipe
in the AppComponent
resolves the error.
It seems that the Language Service is not walking the module imports to identify what pipes are available. It is possible that this also affects components too.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (4 by maintainers)
it displays an error (but compiles) when components from custom angular library modules are used if their module is imported like this:
but errors are gone if I change import like this:
Is it the same problem or should I create a new issue?
PS: the problem is relevant only to my custom components - there are no errors on material components even though they have been exported/imported through the same library module.
Please re-open if you can reproduce in
0.1.0