Open nvminhtu opened 7 years ago
but what problems does dependency injection solve? First and foremost, it decouples the pieces of your application
Dependency injection (DI) is a less-known, yet powerful feature of the framework we know and love called Ember.js
https://www.codeschool.com/blog/2016/06/14/understanding-dependency-injection-in-ember/
app/initializers/your-DI.js
Dependency Injection in Ember — Register & Inject? How?
import Ember from 'ember'; export default Ember.Component.extend({ // perform some action here this.get('error-handler').display('Something went wrong'); });
https://balinterdi.com/blog/dependency-injection-in-ember-dot-js/