jvandemo / jvandemo/generator-angular2-library
StaticInjectorError[ViewContainerRef]
- Dominant language
- JavaScript
- Stars
- 740
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
I successfully create a npm angular module using the generator, however:
- I imported the module I created in an NG app
- Component is loaded successfully, but a *ngFor (it seems) breaks it all, I'm getting the error **StaticInjectorError[ViewContainerRef]**
Detailed error:
`ERROR Error: StaticInjectorError[ViewContainerRef]:
StaticInjectorError[ViewContainerRef]:
NullInjectorError: No provider for ViewContainerRef!
at _NullInjector.get (webpack-internal:///../../../core/esm5/core.js:1118)
at resolveToken (webpack-internal:///../../../core/esm5/core.js:1406)
at tryResolveToken (webpack-internal:///../../../core/esm5/core.js:1348)
at StaticInjector.get (webpack-internal:///../../../core/esm5/core.js:1219)
at resolveToken (webpack-internal:///../../../core/esm5/core.js:1406)
at tryResolveToken (webpack-internal:///../../../core/esm5/core.js:1348)
at StaticInjector.get (webpack-internal:///../../../core/esm5/core.js:1219)
at resolveNgModuleDep (webpack-internal:///../../../core/esm5/core.js:10780)
at NgModuleRef_.get (webpack-internal:///../../../core/esm5/core.js:12001)
at resolveDep (webpack-internal:///../../../core/esm5/core.js:12497)`
Any idea ?
Contributor guide
No contributing guide indexed for this repository
Research direction
No source file or test is named. Reproduce the generated npm Angular module in an NG app, focusing on the component and its *ngFor usage, then trace the StaticInjectorError for ViewContainerRef. Done means identifying the generated-module configuration or component dependency that causes the runtime failure and adding a verified fix or regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100