1

I have a view that has an Array Controller as a property. I would like to get an element at an index within the view.

view: {{ App.array.firstObject }} works but: {{ App.array.objectAt(1) }} doesn't work. I can't iterate in my case.

So is there a way to do that?

1 Answer 1

5

Does {{App.array.[1]}} work for you ?

Sign up to request clarification or add additional context in comments.

4 Comments

no...in the view things work as if you are calling the get() function for each method. For instance: {{App.array[1]}} actually calls App.get('array[1]' which leads to an error. I wonder if there's compatible way for indexing.
sorry, I missed something... App.array.[1]
Ahh ok arrays, I was working with array controller.... {{App.array.content.[1]}} works

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.