Ghost/ghost/admin/app/components/gh-basic-dropdown.js
Kevin Ansfield 9adbcd1fd0 Match service/controller import to ember-modules-codemod style for consistency
no issue

Automated tools, code generators, and editor integrations are increasingly standardising on the import style used in `ember-modules-codemod`. Our import style differed a little with regards to service/controller injection imports which meant we were starting to see inconsistent naming.
2017-10-30 09:38:01 +00:00

20 lines
526 B
JavaScript

import BasicDropdown from 'ember-basic-dropdown/components/basic-dropdown';
import layout from 'ember-basic-dropdown/templates/components/basic-dropdown';
import {inject as service} from '@ember/service';
export default BasicDropdown.extend({
dropdown: service(),
layout,
didInsertElement() {
this._super(...arguments);
this.get('dropdown').on('close', this, this.close);
},
willDestroyElement() {
this._super(...arguments);
this.get('dropdown').off('close');
}
});