Controllers ( Object , Array and itemController ) are leaving. A new way to do this is to use a component.
So, instead of your element controller, you should define a component:
App.MyProductComponent = Ember.Component.extend({ myIndex: function(){ return this.get('passedIndex') + 1; }.property('passedIndex') });
Then inside your #each you will use it like this:
<script type="text/x-handlebars" data-template-name="index"> <ul> {{#each model as |product index|}} {{ my-product passedIndex=index product=product }} {{/each}} </ul> </script>
Working solution here
See the following link and search for itemController - https://github.com/emberjs/rfcs/pull/15
source share