lundi 29 février 2016

Ember passing multiple list items in template

Is it possible to pass multiple list of items in template using {{each}}

Can someone guide me on what I am doing, in my sales-orders.hbs below is my currenet code.

    {{#each model as |detail|}}
        <li>{{sales-orders-grid detail=detail}}</li>
    {{else}}
      Blank
    {{/each}}
    </ul>

Then calling the sales-orders-grid component

Shipping Method
      <div class="col-xs-12 col-md-12 col-sm-12 products-item-products border-left padding10">
        <ul>
            {{#each shippingMethod as |sm|}}
                {{sales-orders-grid-shipping-method sm=sm}}
            {{/each}}
        </ul>
      </div>

In my sales-orders-grid-shipping-method component calling is this:

sm.shippingMethodName

What I'm trying to achieve here is to pass list of items in {{each}} in my main template. Is it possible?




Aucun commentaire:

Enregistrer un commentaire