diff --git a/app/pods/login/controller.js b/app/pods/login/controller.js index 70eca2b..2b2a42a 100644 --- a/app/pods/login/controller.js +++ b/app/pods/login/controller.js @@ -7,12 +7,12 @@ export default Ember.Controller.extend({ let session = this.get('session'); let authenticator = 'simple-auth-authenticator:token'; - this.set('loading', true); // Manually clean up because there might not be a transition this.get('flashMessages').clearMessages(); - session.authenticate(authenticator, credentials).then(null, (error)=> { - this.set('loading', false); - this.get('flashMessages').error(error.error); + this.transitionTo('loading').then(() => { + session.authenticate(authenticator, credentials).then(null, (error)=> { + this.get('flashMessages').error(error.error); + }); }); } } diff --git a/app/pods/login/template.hbs b/app/pods/login/template.hbs index 7d3f5ac..c56ca42 100644 --- a/app/pods/login/template.hbs +++ b/app/pods/login/template.hbs @@ -1,16 +1,12 @@ {{#x-application invalidateSession="invalidateSession"}} - {{#if loading}} - {{loading-panel}} - {{else}} -
-