randombits
randombits

Reputation: 48440

Ember.js: Nesting a resource in a route

I am trying to setup a route with the following:

App.Router.map(function() {
    this.route('login');
    this.route('mlb.lineups', {path: 'tools/mlb/lineups'}, function() {
        this.resource('site', { path: 'site/:site_id' });
    });
});

The problem is, the nested resource 'site' route is not being recognized. If I change mlb.lineups to a type resource, that seems to have funky behavior as well. Ideally I have a root level /tools/mlb/lineups and then site specific URLs/resources such as /tools/mlb/lineups/site/1 /tools/mlb/lineups/site/2 etc.

Upvotes: 0

Views: 34

Answers (1)

Kingpin2k
Kingpin2k

Reputation: 47367

resources/routes can not live under routes.

http://emberjs.com/guides/routing/defining-your-routes/#toc_nested-resources

Upvotes: 1

Related Questions