vendredi 31 juillet 2015

Ember (Handlebars) nested each on one level

For example, I've got following object:

var obj=[
{
    subitems:[
        "string_one",
        "string_two"
    ]
},
{
    subitems:[
        "string_three",
        "string_four"
    ]
}]

and I want to output it like this:

<div>string_one</div>
<div>string_two</div>
<div>string_three</div>
<div>string_four</div>

In the AngularJS I can achieve this by using ng-repeat-start and ng-repeat-end. It's ok to have extra elements, I can hide them in css. The main goal is to have divs on one level.

How can I do the same in Ember (Handlebars)? Thanks in advance!




Aucun commentaire:

Enregistrer un commentaire