I have a Problem with the AngularJS Scope. I want to use a Variable of it, which contains an Object. In the Object I want one index which is saved in another scope Variable. So I want something like that:
{{graphdata.nodes._data.{{selectedElements.nodes[0]}} }}
graphdata.nodes._data is the Object, and the index I want is saved in selectedElements.nodes[0]. Can someone help me with that?
asked Apr 19, 2016 at 10:56
Marvin K
3441 gold badge3 silver badges16 bronze badges
1 Answer 1
You cannot and shouldn't interpolate twice. just write:
{{graphdata.nodes._data[selectedElements.nodes[0]]}}
answered Apr 19, 2016 at 10:58
Kobi Cohen
6784 silver badges9 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
Explore related questions
See similar questions with these tags.
lang-js