我正在使用ember-cli,这是我的路由器
Router.map(function() {
this.resource('app', function(){
this.resource('app.requisitions',{path:'/requisitions'}, function(){
this.resource('app.requisitions.manage', {path:'/manage'}, function(){
this.resource('app.requisitions.manage.draft', {path:'/draft'}, function(){
this.route('detail',{path:'/:id'});
});
});
});
});
});
我让所有这条路线都正常工作。甚至使用下面的代码渲染到应用程序模板(根模板)的细节路径(最后的子节点),我对结果非常满意。
荚/应用/申请/管理/草案/细节/ route.js
Ember.Route.extend({
renderTemplate: function(){
this.render({
into: 'application'
});
}
});
在详细模板中,我希望它有一个后退按钮返回到app.requisitions.manage.draft(上面的1个父母)
{{#link-to 'app.requisitions.manage.draft'}}<button>BACK</button>{{/link-to}}
不幸的是,它不起作用。我真的很无能,我做错了什么。
我收到此错误,
处理路径时出错:app.requisitions.manage.draft.index无法读取未定义的属性'connectOutlet'TypeError:无法读取未定义的属性'connectOutlet'
感谢您的帮助