Treeview and multi selections

1 Answer 101 Views
TreeView
Mark
Top achievements
Rank 1
Veteran
Iron
Mark asked on 07 Nov 2023, 01:58 PM

I am following this article:

Selection - TreeView - Kendo UI for Angular (telerik.com)

that shows using this directive:

[kendoTreeViewSelectable]="selection"

does the trick. However, in my code I am getting:

ERROR NullInjectorError: R3InjectorError(AwaAssetEditorModule)[TreeViewComponent -> TreeViewComponent -> TreeViewComponent -> TreeViewComponent]: 
  NullInjectorError: No provider for TreeViewComponent!
    at NullInjector.get (core.mjs:7493:27)
    at R3Injector.get (core.mjs:7914:33)
    at R3Injector.get (core.mjs:7914:33)
    at R3Injector.get (core.mjs:7914:33)
    at R3Injector.get (core.mjs:7914:33)
    at ChainedInjector.get (core.mjs:12084:36)
    at lookupTokenUsingModuleInjector (core.mjs:3201:39)
    at getOrCreateInjectable (core.mjs:3246:12)
    at Module.ɵɵdirectiveInject (core.mjs:10041:12)
    at NodeInjectorFactory.SelectDirective_Factory [as factory] (progress-kendo-angular-treeview.mjs:95:105)

Line 95 has something to do with a version of the software. I am running version 13.4.0. Is it compatible with this multi select functionality?

Thanks

1 Answer, 1 is accepted

Sort by
0
Mark
Top achievements
Rank 1
Veteran
Iron
answered on 07 Nov 2023, 05:00 PM
No need for help. I figured it out.
Johnathan
Top achievements
Rank 1
commented on 07 Jun 2024, 07:45 PM

Can you please share your solution?

Thanks!

Zornitsa
Telerik team
commented on 12 Jun 2024, 08:42 AM

Hi,

The mentioned error generally occurs when a service is trying to be injected but has no corresponding provider declared. More information regarding this error is available in the following article from Angular documentation:

Since there is no particular information regarding the configuration of the application and the TreeView component in your scenario, I could provide some general suggestions that might help in resolving the error.

Firstly, what you could verify is whether the TreeViewModule is correctly imported on your side. Below I am linking an article from our documentation that shows how to import the module in both NgModule and standalone projects:

Alternatively, the developer could also try updating the Kendo UI for Angular packages to the latest version in order to ensure that there are not any discrepancies between the versions of the packages, which may cause unexpected behavior like the mentioned error:

I hope this helps.

Regards,
Zornitsa
Progress Telerik

Tags
TreeView
Asked by
Mark
Top achievements
Rank 1
Veteran
Iron
Answers by
Mark
Top achievements
Rank 1
Veteran
Iron
Share this question
or