Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes from #10256 break App.Router in initializers #10807

Closed
ghost opened this issue Apr 2, 2015 · 2 comments
Closed

Changes from #10256 break App.Router in initializers #10807

ghost opened this issue Apr 2, 2015 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 2, 2015

The changes in #10256 breaks the following for me: (using ember-cli)

export default {
  name: 'foo',
  initializer: function(container, app) {
    app.Router.map(function() {
       this.route('foo');
    });
  }
});

As the router used in the initializer is now destroyed/replaced when app/router is loaded.

This change fixed it for me:

export default {
  name: 'foo',
  initializer: function(container, app) {
    var Router = container.lookupFactory('router:main');
    Router.map(function() {
       this.route('foo');
    });
  }
});

This issue is probably more of documentation for other people hitting this problem.

@rwjblue
Copy link
Member

rwjblue commented Aug 16, 2015

@martndemus - Is this still an issue? Looking at the code, can you see a solution to fix this? If not, how should we document?

@rwjblue
Copy link
Member

rwjblue commented Apr 14, 2016

This doesn't seem to be a common issue, so I'm going to close this. If someone is interested in pursuing this we can reopen...

@rwjblue rwjblue closed this as completed Apr 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant