CirclonGroup / angular-tree-component

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

Use of treeNodeFullTemplate not clear #802

Closed MooDySmiles closed 4 years ago

MooDySmiles commented 4 years ago

Hi, I'm trying to use the treeNodeFullTemplate in my app in order to fully customize the component, but I don't seem to be able to view my datas after copying the new template described in here.

My datas don't have the name property, so I want to display the label of each node using another property, but I'm failing at that.

I tried to combine this new template with the previous ones (treeNodeTemplate and loadingTemplate), but nothing seems to work, and reading the docs isn't really helping me right now.

How can I tell the component to look for the property otherName instead of name?

I made an example on stackblitz.

MooDySmiles commented 4 years ago

My bad, it is enough to use displayField: 'ohterName' in the options object to pass to tree-root.