Access to an array element in Ember handles

I have a simple array in the controller:

App.HomeController = Ember.Controller.extend({ items: ['item1', 'item2', 'item3'] }); 

I would like to display the first element in the template; following the instructions in the other posts I make:

 {{items.[0]}} 

Or that...

 {{controller.items.[0]}} 

... but the result is always nothing; Am I doing something wrong here?

+7
source share
1 answer

You are not doing anything wrong. They should work ( demonstration ). The problem lies elsewhere. I can not say without a code.

+8
source share

All Articles