2014-02-21 23 views
0

我找到了一個線程,我應該實現PostsRou​​te但我得到了錯誤。有人有個想法嗎?聲明失敗:錯誤:斷言失敗:URL'/posts.index'與您的應用程序中的任何路由不匹配

App = Ember.Application.create({ 
    LOG_TRANSITIONS: true 
}); 

App.Router.map(function() { 
    // put your routes here 
    //this.resource("projects", function() {}); 
    this.resource('posts', function() {}); 
    this.resource('projects'); 
}); 

App.PostsRoute = Ember.Route.extend({}); 

回答

0

我相信posts.index只有當你有嵌套在posts(你似乎沒有根據您發佈的代碼有子路由被創建。嘗試用posts更換鏈接posts.index

+0

我已經嘗試了嵌套新路線的IT,但是這是同樣的問題。 – Gerrit

+0

你能提供一個jsBin嗎? – chopper