2015-02-12 21:22:32 -07:00
|
|
|
import Ember from 'ember';
|
2014-06-25 14:12:48 +02:00
|
|
|
|
2016-01-19 07:03:27 -06:00
|
|
|
const {
|
|
|
|
Controller,
|
|
|
|
computed,
|
|
|
|
get,
|
|
|
|
inject: {service, controller}
|
|
|
|
} = Ember;
|
2015-10-28 11:36:45 +00:00
|
|
|
const {match} = computed;
|
2015-05-25 21:10:50 -05:00
|
|
|
|
2015-10-28 11:36:45 +00:00
|
|
|
export default Controller.extend({
|
2016-01-19 07:03:27 -06:00
|
|
|
appController: controller('application'),
|
|
|
|
ghostPaths: service(),
|
2014-06-25 14:12:48 +02:00
|
|
|
|
2015-10-28 11:36:45 +00:00
|
|
|
showBackLink: match('appController.currentRouteName', /^setup\.(two|three)$/),
|
|
|
|
|
|
|
|
backRoute: computed('appController.currentRouteName', function () {
|
|
|
|
let appController = this.get('appController');
|
|
|
|
let currentRoute = get(appController, 'currentRouteName');
|
2014-06-25 14:12:48 +02:00
|
|
|
|
2015-07-16 15:12:03 +01:00
|
|
|
return currentRoute === 'setup.two' ? 'setup.one' : 'setup.two';
|
|
|
|
})
|
2014-06-25 14:12:48 +02:00
|
|
|
});
|