Created
September 17, 2013 21:18
-
-
Save jrhe/6600784 to your computer and use it in GitHub Desktop.
Ember Inject problem. Inject was injecting currentUser to all controllers except application and index. Passing the promise directly to inject solved this.
This file contains hidden or 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
var user = store.find('user', 'current'); | |
container.lookup('controller:currentUser').set('content', user); | |
App.inject('controller', 'currentUser', 'controller:currentUser'); |
This file contains hidden or 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
var user = store.find('user', 'current').then(function(user) { | |
container.lookup('controller:currentUser').set('content', user); | |
App.inject('controller', 'currentUser', 'controller:currentUser'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment