Ghost/ghost/admin/app/controllers/setup.js
Kevin Ansfield 983110d931 Switched from ember-cli-shims to new module imports (#779)
no issue

- add eslint-plugin-ember, configure no-old-shims rule
- run `eslint --fix` on `app`, `lib`, `mirage`, and `tests` to move imports to the new module imports
- further cleanup of Ember globals usage
- remove event-dispatcher initializer now that `canDispatchToEventManager` is deprecated
2017-08-22 14:53:26 +07:00

19 lines
682 B
JavaScript

import Controller from '@ember/controller';
import {computed} from '@ember/object';
import {inject as injectController} from '@ember/controller';
import {inject as injectService} from '@ember/service';
import {match} from '@ember/object/computed';
export default Controller.extend({
appController: injectController('application'),
ghostPaths: injectService(),
showBackLink: match('appController.currentRouteName', /^setup\.(two|three)$/),
backRoute: computed('appController.currentRouteName', function () {
let currentRoute = this.get('appController.currentRouteName');
return currentRoute === 'setup.two' ? 'setup.one' : 'setup.two';
})
});