0

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?

1 Answer 1

1

You cannot and shouldn't interpolate twice. just write:

{{graphdata.nodes._data[selectedElements.nodes[0]]}}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.