framework/ember/app/routes/application.js
2014-12-20 16:56:46 +10:30

29 lines
521 B
JavaScript

import Ember from 'ember';
import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin';
export default Ember.Route.extend(ApplicationRouteMixin, {
actions: {
login: function() {
return this.render('login', {
into: 'application',
outlet: 'modal'
});
},
doLogin: function() {
this.get('session').authenticate('authenticator:custom', {});
},
closeModal: function() {
return this.disconnectOutlet({
outlet: 'modal',
parentView: 'application'
});
}
}
});