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

Force ID Only In Route/Model/Link-to

$
0
0

@bkparso wrote:

Hi there,

For some routes that show a pile of unrelated data, I believe it is standard practice to use Ember.RSVP.hash({...}) in the model hook of the route. This allows calling more than API handler to get data.

However, this only works if you pass an ID (or nothing) in various link-to's of that route. For example, {{link-to "Dashboard" "dashboard" model.id}} will work, but {{link-to "Dashboard" "dashboard" model}} will not, as it skips the model hook on the router.

Is there any way to enforce that a route is only called with an ID, and not a full model?

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4828

Trending Articles