Ember.js:防止破坏视图

Ember.js:防止破坏视图,ember.js,Ember.js,我的路线设置如下: this.resource('post',{path:":post_id"},function(){ this.resource('selectimage',{path:"selectimage/:returncontext"},function(){ }); }); post.index和selectimage都被渲染到单独的输出端: // PostIndexRoute renderTemplate: function (controller) {

我的路线设置如下:

this.resource('post',{path:":post_id"},function(){
    this.resource('selectimage',{path:"selectimage/:returncontext"},function(){    });
});
post.index和selectimage都被渲染到单独的输出端:

// PostIndexRoute
renderTemplate: function (controller) {
    this.render({ outlet: 'detailColumn' });
},

// SelectimageRoute
renderTemplate: function (controller) {
    this.render({ outlet: 'modal' });
},
当我从post导航到post/selectimage时,post.index视图将被销毁,而destroy元素将被调用。 当我导航回selectimage post时,需要重新渲染索引


我是否可以防止这种行为,并将视图保留在适当的位置,直到我真正离开post资源?

不要使用post下的索引路由,而是使用post路由/post控制器/post模板,当您访问它们下面的资源时,这些视图不会被破坏


本质上,索引路径与selectimage路径不同,因此当您导航到该路径时,它将被删除。

Yep。我应该早点看到的:谢谢