dimanche 11 janvier 2015

Trigger transition to 'loading' route after ember-simple-auth authentication

I'd like to display a "loading..." animation to the users logging into my application.


Ember automatically transitions to a 'loading' route (if any) if a model returns a promise, so it gives the opportunity to display a 'loading' template till the server responds.


Now, I have a login form where submit triggers the 'authenticate' action in my controller (which is defined in the LoginControllerMixin). This seems not to be recognised as a promise by ember, hence the application does not transition to the 'loading' route.


Maybe there is a way around this using simple-auth session state, but I can't figure it out


any help would be appreciated





Aucun commentaire:

Enregistrer un commentaire