-
Notifications
You must be signed in to change notification settings - Fork 602
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
Don't advertize deprecated initializer functionality #462
Comments
@zeppelin could you submit a PR with an alternative solution? I'm very interested in this concept because I've used a lot of Thanks! |
It would probably be god to use Ember's new service injection API. @dgeb: would that be the suggested way of making the session available, e.g. //app/components/my-component.js
export default Ember.Component.extend({
session: authManager: Ember.inject.service('session')
}) ? |
If you want to make a service available on a particular component, then you can definitely use the service injection API. Note that:
Is equivalent to:
This is because the property is named the same as the service ( You can certainly also call I've opened an RFC to steer the registry / container / initializer work in the direction I'd like to take it: emberjs/rfcs#46 |
Thanks @dgeb! Ember Simple Auth now uses the application's |
Great - glad to help! |
Since the Ember container/registry separation, calling
lookup
in initializers is deprecated and available only for backwards-compatibility, yet it's usage is still advertised in theApplicationRouteMixin
's documentation. It would be good if an alternative solutuion was offered instead.The text was updated successfully, but these errors were encountered: