Ghost/ghost/admin/app/controllers/setup.js
Kevin Ansfield f8ccb81dfc 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';
})
});