Displaying a List of Items

You can display a list of items using the {{#each}}{{/each}} block helper.

As an example, if your result object contains the following data

{
    entity: entityObj,
    data: {
        summary: ['tag1', 'tag2'],
        details: ['datum1', 'datum2', datum3']
    }
}

You could iterate over the details array with the following

template.hbs
{{#each block.data.details as | item |}}
    {{item}}
{{/each}}

In our example this would create the following HTML

<span>datum1</span><span>datum2</span><span>datum3</span>

Last updated