Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4829

How to Load single model multiple time in model hook

$
0
0

@shailendra.singh3 wrote:

//....route.js

    0
    down vote

    favorite

I want to fill up multiple drop-down from API like below where i have to pass type parameter like 'department','priority' etc. It didn't return expected result as using one model 'lookup' for multiple calls.Sometime returns data of both department and some time priority data only and other department drop-down does not have any record.

model(){ var _this=this; return Ember.RSVP.hash({ status: _this.fetchLookup('department'), priority: _this.fetchLookup('priority'), }); }, fetchLookup(type) { return this.store.query('lookup', { LookupType: type }); }

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4829

Trending Articles