Injecting session into a model
问题 I'd like to be able to inject my Session singleton into my Ember models. The use case I'm trying to support is having computed properties on the model that react to the user's profile (a property on the Session object). App = window.App = Ember.Application.create({ ready: function() { console.log('App ready'); this.register('session:current', App.Session, {singleton: true}); this.inject('session:current','store','store:main'); this.inject('controller','session','session:current'); this.inject