ember.js: how to abort transitions if target matches current path -


is there general way (i.e. in application-router) abort transitions if target (including dynamic ids) matches current route?

i tried hooking willtransition transition.params found seem contain current ids , have nothing compare them to.

the params attribute of transition reference current route's params, not target. need @ models provided transition via providedmodels attribute. code should this:

willtransition: function(transition) {   if ((this.get('routename') === transition.targetname) &&       (this.get('currentmodel') === transition.providedmodels[transition.targetname])) {     transition.abort();     return;   }    // ... other code here ... } 

Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -