2014-03-31 27 views
0

我試圖讓一個應用程序與Ember.js工作。結構應該是這樣的:餘燼和嵌套路線,瘋狂與白手起家活動 - 屬性

enter image description here

我定義這樣的路線:

App.Router.map(function() { 
    this.route("index", { path: "/" }); 
    this.route("about"); 
    this.resource('customer', { path: "/customer/:customer_id" }, function() { 
     this.resource('customerCars', { path: '' }, function() { 
      this.resource('customerCar', { path: '/Car/:car_id' }, function() { 
       this.route('vehicledetails'); 
       this.route('engine'); 
      }); 
      this.route('create'); 

     }); 
    }); 
}); 

現在工作到這一點,我可以在「奧迪」鏈接點擊,和轉換到「Vehicledetails」。我與引導工作,我想要的「奧迪」鏈接類獲取活動 - 屬性。這僅僅是可能的,如果奧迪-Link的我customerCars.index內 - 模板是建立這樣的:

{{#each model}} 
    {{#link-to 'customerCar.vehicledetails' id tagName='li' }} 
    {{#link-to 'customerCar.vehicledetails' id}} 
    {{viewName}} 
    {{/link-to}} 
    {{/link-to}} 
    {{/each}} 

    {{outlet}} 

當用戶然後選擇「引擎」鏈接,「奧迪」 -Link失去了它的活動屬性。我嘗試了不同的路由定義和鏈接到版本。當我嘗試指向「customerCar」鏈接到,然後所有的鏈接(奧迪,奔馳,自行車)獲取活動屬性,當我選擇他們中的一個。

誰能幫我出我的困惑?

THX

回答

0

這裏的問題是,我用灰燼的破金絲雀 - 建造(因爲我使用的是測試版,Fature「查詢-PARAMS」)。這個特定的Build以不同的方式處理活動鏈接(我猜)。

它與最新的加那利生成。