【问题标题】:Assertion Failed: Error: Assertion Failed: The URL '/posts.index' did not match any routes in your application断言失败:错误:断言失败:URL '/posts.index' 与应用程序中的任何路由都不匹配
【发布时间】:2014-02-21 08:48:00
【问题描述】:

我找到了一个我应该实现 PostsRou​​te 的线程,但我得到了进一步的错误。有人有想法吗?

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({});

【问题讨论】:

    标签: ember.js


    【解决方案1】:

    我相信posts.index 只有在您有嵌套在posts 中的子路由时才会创建(根据您发布的代码,您似乎没有。尝试将posts.index 的链接替换为posts .

    【讨论】:

    • 我已经尝试使用嵌套新路由进行 IT。但那是同一个问题。
    • 你能提供一个jsBin吗?
    猜你喜欢
    • 2013-03-17
    • 2012-11-28
    • 1970-01-01
    • 2021-10-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多