News for hackers. Stuff that matters.
Re:Reasons to not use Ember.js by pyre on Tuesday November 18, 2014 @11:50AM (#8624776)
Yes and no. Depends on how the routes are structured in the code. In your example:

  /users/
  /users/15/
  /users/15/photos/
Your router map probably looks like this:

  App.Router.map(function() {
    this.route('index', { path: '/' });
    this.resource('users', { path: '/users' }, function () {
      this.route('index', { path: '/' });
      this.route('show', { path: '/:user_id' });
      this.route('photos', { path: '/:user_id/photos' });
    });
  });
This translates into a structure like:

  ApplicationRoute
    IndexRoute
    UserRoute
      UsersIndexRoute
      UserShowRoute
      UserShowPhotosRoute
Note how all of those Users*Route classes are all siblings rather than in parent-child relationships. Also note that if you're sharing controllers, they won't pass through Route.setupController on the sibling routes because those routes aren't run.

There are no comments on this comment yet.