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

ModelFor Issue in Engine's Routes

$
0
0

@kishoreyuvan wrote:

Hi all, while working with modelFor in my engine, I got an issue. I have an engine ‘settings’ on my host Application. The settings’s routes.js looks like,

this.route(‘users’, function() { this.route(‘list’, function() { this.route(‘details’, { path: ‘/:user_id’ }, function() { this.route(‘activities’); }); }); });

I’m trying to do this.modelFor(‘users/list/details’) in the model hook of users/list/details/activities route, it’s returning undefined.

I found the reason is that, route.js’s getEngineRouteName method will prepend the Engine name with Route Name(looks like settings.users/list/details). So the Route not found in Engine Instance.

Is there any way to retrieve the model of Parent Route?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles