2013-08-29 31 views

回答

3

您可以定義使用*一個包羅萬象路線,並從那裏做了重新定位:

App.Router.map(function() { 
    this.route('catchAll', { path: '*:' }); 
}); 

App.CatchAllRoute = Ember.Route.extend({ 
    redirect: function() { 
    alert('route not existen'); 
    this.transitionTo('index'); 
    } 
}); 

更新jsbin

希望它有幫助。

+0

哇..工作..謝謝 – thecodejack

相關問題