error NG2012: Component imports must be standalone components, directives, pipes, or must be NgModules

318 Views Asked by At

If we add some dependency in angular standalone component and app.module then show this error:

error NG2012: Component imports must be standalone components, directives, pipes, or must be NgModules

enter image description here

enter image description here

1

There are 1 best solutions below

1
Suresh Rajan Alagarsamy On

Based on the shared details, we have confirmed successful import of the “TreeViewModule” from the “@Syncfusion/ej2-angular-navigations” package without encountering any reported issues.

We have attached a sample for your reference.

Sample : https://stackblitz.com/edit/angular-1d5jjb-kfhrd6?file=src%2Fapp.component.ts

Additionally, we have provided the user guide documentation that explains the steps required to create a simple Angular TreeView component, and configure its available functionalities.

Documentation : https://ej2.syncfusion.com/angular/documentation/treeview/getting-started