question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Only root nodes are appearing.

See original GitHub issue

My component’s code

constructor( @Optional() private nodes:EvaluationMapperNodes[] ) { } ngOnInit() { this.makeNodes() this.writeAuthorized = this.authenticationService.isUserAuthorized('admin'); } makeNodes(){ this.nodes=[ { id: 1, name: 'root1', children: [ { id: 2, name: 'child1' }, { id: 3, name: 'child2' } ] }, { id: 4, name: 'root2', children: [ { id: 5, name: 'child2.1' }, { id: 6, name: 'child2.2', children:[ {id:7, name:'child2.2.1'} ] } ] }, ]; } And data type declaration export class EvaluationMapperNodes { id: number; name: string; children: EvaluationMapperNodes[]; }

Using ‘EvaluationMapperNodes’ class inside EvaluationMapperNodes is giving error that it is not assignable. and If I us any[], only root appears tree-component

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
webwizrdcommented, Dec 3, 2017

For me, the issue was that components were not correctly tagged. So I ended up modifying the .css file by putting ":host /deep/ " in front of all the defined styles - works fine now.

1reaction
salilbajajcommented, Nov 22, 2017

@webwizrd My issue was appearing because I dint include its css in angular-cli.json. Included it and it started working just fine. Its not mentioned in Documentation thats why missed it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tree structure-starting with only root node onload
I would like to have a tree with all the nodes collapsed, so the initial graph should contain only one node (the root)....
Read more >
RadTreeView Only display ROOT nodes - Telerik
Hello, i have really simple RadTreeView control. but there is an issue, nodes only display if they have "0" ParentID.
Read more >
Duplicate DIsplay of Root Node in System.Windows.Forms ...
I was able to verify that the root nodes do not physically get duploiated. The number of nodes in the Package treeview (Nodes...
Read more >
TreeView only showing root node - C# / C Sharp - Bytes
Hi everyone. Has anyone idea what would cause a TreeViewControl to show only the root node if I am using a bog-standard .sitemap...
Read more >
Find root of the tree where children id sum for every node is ...
Every node id appears in children sum except root. So if we do the sum of all ids and subtract it from the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found