vendredi 28 octobre 2016

Ember: this.transitionTo works only once

I got a "Settings"-Controller for my route "/settings".

But this specific route does not exist. There are only following routes:

  • /settings/account
  • /settings/system

Now, i want to redirect all "/settings" requests to "/settings/account". This works fine, ... but just once.

If i click on a button with the target "/settings" i get redirected to "/settings/account". But if i click a second time on that same button, there is no redirect and it gets me on "/settings".

Here is my code:

export default Ember.Route.extend({
   redirect() {
     this.transitionTo('settings.account');         
   }
});

Why does this works just once?




Aucun commentaire:

Enregistrer un commentaire