CirclonGroup / angular-tree-component

A simple yet powerful tree component for Angular (>=2)
https://angular2-tree.readme.io/docs
MIT License
1.09k stars 489 forks source link

NullInjectorError: No provider for TreeDraggedElement! #871

Closed ravimittal16 closed 3 years ago

ravimittal16 commented 3 years ago

Minimal reproduction of the bug/regression with instructions:

We moved to angular 8* and @circlon/angular-tree-component": "^9.0.3", Getting this error now

DropdownListComponent.html:22 ERROR NullInjectorError: StaticInjectorError(RootModule)[TreeComponent -> TreeDraggedElement]: StaticInjectorError(Platform: core)[TreeComponent -> TreeDraggedElement]: NullInjectorError: No provider for TreeDraggedElement! at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (http://localhost:4000/vendor.js:107631:25) at resolveToken (http://localhost:4000/vendor.js:107869:24) at tryResolveToken (http://localhost:4000/vendor.js:107813:16) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (http://localhost:4000/vendor.js:107717:20) at resolveToken (http://localhost:4000/vendor.js:107869:24) at tryResolveToken (http://localhost:4000/vendor.js:107813:16) at StaticInjector.push../nodemodules/@angular/core/fesm5/core.js.StaticInjector.get (http://localhost:4000/vendor.js:107717:20) at resolveNgModuleDep (http://localhost:4000/vendor.js:124866:29) at NgModuleRef.push../nodemodules/@angular/core/fesm5/core.js.NgModuleRef.get (http://localhost:4000/vendor.js:125555:16) at resolveNgModuleDep (http://localhost:4000/vendor.js:124866:29)

Versions of Angular Tree Component, Angular, Node, affected browser(s) and operating system(s):

Angular 8.0.3*

Please advise

ravimittal16 commented 3 years ago

I was able to fix by adding TreeDraggedElement to providers