jvandemo / generator-angular2-library

Yeoman generator to create an Angular library
MIT License
752 stars 122 forks source link

StaticInjectorError[] if class has Dependency Injection (Angular 5) #259

Closed kudo183 closed 6 years ago

kudo183 commented 6 years ago

when I try to build package with class has DI parameter, for exmple the UnlessDirective from this https://angular.io/guide/structural-directives, I get this error message when run:

message: "StaticInjectorError[TemplateRef]: \n StaticInjectorError[TemplateRef]: \n NullInjectorError: No provider for TemplateRef!"

does it need some special config for DI ?

kudo183 commented 6 years ago

i had find how to config NgModule from https://angular.io/guide/ngmodule