How do I display a specific item in an array within my ArrayController.content[] property? I have this code below:
App.View.PairView = Em.View.create({
templateName: 'display-template',
controller: App.Controller.PairController
});
App.Controller.PairController = Em.ArrayController.create({
content: [],
createNew: function(){
var weeks = ['1','2','3'];
var quarters = ['Q1', 'Q2', 'Q3'];
var months = ['Jan', 'Sep', 'Dec'];
this.set('content', []);
this.pushObject(weeks);
this.pushObject(quarters);
this.pushObject(months);
}
});
I only want to get App.Controller.PairController.content[0][0] or the “weeks”. How do i write that if I have the handlebars template below?
<script type="text/x-handlebars" data-template-name="display-template">
{{#each item in controller}}
???????????????????????
{{/each}}
</script>
Thank you.
Go by index .0 or .1 etc…
{{item.0.0}}