2016-03-28 34 views

回答

0

您可以使用一個按鈕的處理程序,使一個過渡:

actions:{ 
    bazClicked(){ 
     var moduleRouteName = this.get('routeName'); 
     this.transitionTo(moduleRouteName+'.baz',); 
    }, 
     ... 

或(第二個選項)旁路通道參數與結合,並在路線計算。

{{#link-to (concat currentRouteName 'baz')}}text{{/link-to}} 

在您的組件:

currentRouteName : Ember.computed(function(){ 
    return Ember.getOwner(this).lookup('service:-routing').get('currentRouteName'); 
}) 
相關問題