nvminhtu / EmberJS

EmberJS Best Practices
0 stars 0 forks source link

Understanding Dependency Injection in Ember #19

Open nvminhtu opened 7 years ago

nvminhtu commented 7 years ago

https://balinterdi.com/blog/dependency-injection-in-ember-dot-js/

nvminhtu commented 7 years ago
nvminhtu commented 7 years ago

https://www.codeschool.com/blog/2016/06/14/understanding-dependency-injection-in-ember/

app/initializers/your-DI.js

nvminhtu commented 7 years ago

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'); });