framework/ember/app/routes/application.js

27 lines
523 B
JavaScript
Raw Normal View History

2014-12-20 14:26:46 +08:00
import Ember from 'ember';
import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin';
export default Ember.Route.extend(ApplicationRouteMixin, {
actions: {
login: function() {
this.controllerFor('login').set('error', null);
this.render('login', {
into: 'application',
outlet: 'modal'
});
},
closeModal: function() {
this.disconnectOutlet({
outlet: 'modal',
parentView: 'application'
});
},
sessionChanged: function() {
this.refresh();
}
}
});