1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/controllers/setup.js
Kevin Ansfield f9de54aa18 Fixed deprecated access of controller.{currentPath,currentRouteName}
no issue

- replaced access of `controller.{currentPath,currentRouteName}` with `router.currentRouteName`
- https://deprecations.emberjs.com/v3.x/#toc_application-controller-router-properties
2019-05-06 14:51:23 +01:00

19 lines
610 B
JavaScript

/* eslint-disable ghost/ember/alias-model-in-controller */
import Controller from '@ember/controller';
import {computed} from '@ember/object';
import {match} from '@ember/object/computed';
import {inject as service} from '@ember/service';
export default Controller.extend({
ghostPaths: service(),
router: service(),
showBackLink: match('router.currentRouteName', /^setup\.(two|three)$/),
backRoute: computed('router.currentRouteName', function () {
let currentRoute = this.router.currentRouteName;
return currentRoute === 'setup.two' ? 'setup.one' : 'setup.two';
})
});