Forked from eliotsykes/current-route-query-params-ember-component.js
Last active
May 21, 2017 23:16
-
-
Save ezy/49f08023702f3034f26166d4fd99fdc5 to your computer and use it in GitHub Desktop.
How to lookup or resolve other class instances, or register new factories into the owner.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* For Ember < 2.4 | |
*/ | |
this.get('container').lookup('router:main').router.state; | |
/** | |
* For Ember > 2.4 | |
*/ | |
import Ember from 'ember'; | |
const { getOwner } = Ember; | |
getOwner(this).lookup('router:main').router.state; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment