1107798da6
Generated with a codemode: https://github.com/ember-cli/ember-modules-codemod
29 lines
569 B
JavaScript
29 lines
569 B
JavaScript
import { inject as service } from '@ember/service';
|
|
import Route from '@ember/routing/route';
|
|
|
|
export default Route.extend({
|
|
config: service(),
|
|
|
|
resetController(controller, isExiting) {
|
|
if (isExiting) {
|
|
controller.set('error', null);
|
|
}
|
|
},
|
|
|
|
actions: {
|
|
didTransition() {
|
|
if (!this.get('config.isTest')) {
|
|
window.scrollTo(0, 0);
|
|
}
|
|
},
|
|
|
|
willTransition() {
|
|
this.controllerFor('application').set('error', null);
|
|
},
|
|
|
|
error(error) {
|
|
this.controllerFor('application').set('error', error);
|
|
},
|
|
},
|
|
});
|