【发布时间】:2015-05-18 11:25:32
【问题描述】:
我的理解是 Ember 1.11.0 在路由器中弃用了resource,而只支持使用route。根据我所读到的,两者之间的区别在于 resource 创建了一个命名空间。见:What is the difference between a route and resource in New Router API?
所以问题是如何命名路由,以便在下面的示例中,我的 cmets 路由、控制器和视图不以“帖子”为前缀?
App.Router.map(function() {
this.route("posts", { path: "/" }, function() {
this.route("new", { path: "/new" });
this.route("comments", { path: "/comments" }, function() {
this.route("new", { path: "/new" });
});
});
});
【问题讨论】:
标签: ember.js