1

Is it currently possible to use Ember.computed properties on objects properties in an array.

goalOneActive: Ember.computed.notEmpty('goals.[0].name')
4
  • Of course as soon as I post the question I figure out the answer. Thanks coffee. The correct syntax is Ember.computed.notEmpty('goals.0.name') Commented May 5, 2014 at 13:26
  • 2
    Good job answering your own question! Consider posting your comment as an answer instead of a comment so that there's an official answer and also for more visibility. Commented May 5, 2014 at 13:39
  • Welcome to StackOverflow! It's OK to answer your own question- In doing so, it improves the body of knowledge in StackOverflow that could help others with your same problem. Commented May 6, 2014 at 21:43
  • Thanks. SO wouldn't let me accept it so quickly after posting the question. Commented May 14, 2014 at 13:08

1 Answer 1

1

The correct syntax is

Ember.computed.notEmpty('goals.0.name')
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.