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

22 lines
365 B
JavaScript
Raw Normal View History

2017-09-19 14:47:10 +00:00
import Ember from 'ember';
const { Route } = Ember;
export default Route.extend({
resetController(controller, isExiting) {
if (isExiting) {
controller.set('error', null);
}
},
actions: {
didTransition() {
window.scrollTo(0, 0);
},
error(error) {
this.controllerFor('application').set('error', error);
},
},
});