Answer the question
In order to leave comments, you need to log in
How to create an Angular 6 npm package?
Good afternoon! Tell me who came across how to create a library package? I try to create on the dock https://github.com/angular/angular-cli/wiki/storie... and everything seems to work, but as soon as I add ngClass for example:
the library is being built, but when it is imported, an error occurs:<div [ngClass]="'test'">test</div>
ERROR Error: StaticInjectorError(AppModule)[NgClass -> KeyValueDiffers]:
StaticInjectorError(Platform: core)[NgClass -> KeyValueDiffers]:
NullInjectorError: No provider for KeyValueDiffers!
at NullInjector.get (core.js:1233)
at resolveToken (core.js:1540)
at tryResolveToken (core.js:1471)
at StaticInjector.get (core.js:1333)
at resolveToken (core.js:1540)
at tryResolveToken (core.js:1471)
at StaticInjector.get (core.js:1333)
at resolveNgModuleDep (core.js:10291)
at NgModuleRef_.get (core.js:11376)
at resolveDep (core.js:11868)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question