Nested route not matched


#1

With the following routes defined, I expected the dashboard route to be matched on the site root url. However, the wide route is matched and the page ends up being empty. Both the app and wide route are not used as real routes but only split the site’s routes in 2 different layout files.

Is there a better way to achieve my goal? (splitting the application routes in 2 different layout files).

  this.route('app', { path: '' }, function() {
    this.route('dashboard', {path: ''});
  });

  this.route('wide', {path: ''}, function() {
    this.route('full');
  });

#2

@stephan what exactly do you mean by “splitting the application routes in 2 different layout files”? Like rendering two application level templates at the same time? If that’s the case you may want to use renderTemplate or something like ember-wormhole.

Either way I think the problem is partly that you’re not giving paths to your routes but you’re passing the path arg (blank). So I’m guessing the way ember sees this is “defined a route called app with no path, and a sub route with no path, ok now overwrite the route at no path with another route called wide and a subroute called full” which is why wide gets rendered instead of dashboard.