open-nomad/ui/app/routes/application.js

23 lines
425 B
JavaScript

import Ember from 'ember';
const { Route } = Ember;
export default Route.extend({
resetController(controller, isExiting) {
if (isExiting) {
controller.set('error', null);
}
},
actions: {
didTransition() {
this.controllerFor('application').set('error', null);
window.scrollTo(0, 0);
},
error(error) {
this.controllerFor('application').set('error', error);
},
},
});