Quantcast
Viewing all articles
Browse latest Browse all 4827

Loading data for a route that is not part of the model

@mrjerome wrote:

What’s a good way to load data needed for a route but not part of the model? For example let’s say I have a create user route, and the user has a department property. We need to fill a dropdown with the available departments from the database. Right now we are using a model hash and it smells bad to me.

model() {
    return RSVP.hash({
        user: store.find('user'), 
        departmentsdropdown: $.get(foo)
    });
}

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4827

Trending Articles