Open SoftCreatR opened 7 years ago
The field
property isn't designed to be used for deep object traversal - it is simply the name of the property of the node.
You have two options I would say:
cellTemplate
for your node where you can access everythin from your objectFlattening is a bad idea imho, if you have a large set of nodes. Interestingly, i can't make the cellTemplate
approach work.
What are you concrete problems with the cellTemplate
?
Inside the template you can access your node via row.branch
. That gives you the single node.
Shortened Example:
...
cellTemplate: "<span>{{row.branch.foo.bar}}</span>",
...
Ah, that did the trick. I was missing the surrounding span, so all i got was an error.
Thank you :)
Yeah, you need one html element to let angular render the whole thing - otherwise it complains ;-)
Hi,
the objects i use to generate the table contain sub objects e.g.
I try to access the property
bar
from this object:However, that doesn't work for some reason. It doesn't display anything. But if i do
it displays:
How can i get around that without changing the format of the JSON?