Created
April 20, 2015 15:39
-
-
Save elidupuis/eb87fe03528618592ab4 to your computer and use it in GitHub Desktop.
Inject your Ember Application object into other parts of your app.
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
| // app/intializers/application.js | |
| /** | |
| * Expose the Application object to all Routes, Controllers, and Services. | |
| * This is a simple way to gain access to things like `application.verison`... | |
| */ | |
| export function initialize(container, application) { | |
| application.inject('route', 'application', 'application:main'); | |
| application.inject('controller', 'application', 'application:main'); | |
| application.inject('service', 'application', 'application:main'); | |
| } | |
| export default { | |
| name: 'application', | |
| initialize: initialize | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment