i've been trying to build the library with angular 13 and im getting an circular dependency error:
The component 'TreeNodeChildrenComponent' is used in the template but importing it would create a cycle: D:/DATA_WINDOWS/documents/_projects/angular-tree-component/projects/angular-tree-component/src/lib/components/tree-node/tree-node.component.ts -> D:/DATA_WINDOWS/documents/_projects/angular-tree-component/projects/angular-tree-component/src/lib/components/tree-node-children/tree-node-children.component.ts -> D:/DATA_WINDOWS/documents/_projects/angular-tree-component/projects/angular-tree-component/src/lib/components/tree-node-collection/tree-node-collection.component.ts -> D:/DATA_WINDOWS/documents/_projects/angular-tree-component/projects/angular-tree-component/src/lib/components/tree-node/tree-node.component.ts
Any idea on how to solve this?
PS: If i build it with angular 11 i dont have any errors
https://stackblitz.com/edit/angular-ivy-fyvwvj?file=src/app/angular-tree-component.module.ts
UPDATE: i've ran madge to find the circular dependency and noticed that there is an issue also in the models.
Merged all models in a single file but the circular dependency continues on the components
I was able to fix th issue by merging
tree-node.component.ts
,tree-node-children.component.ts
andtree-node-collection.component.ts
into a single file.