是否可以动态地添加和删除地区与木偶的布局?我的应用程序需要能够从布局推动和流行地区。当你在一个项目的源$ C $ C钻取这类似于GitHub上如何推动和持久性有机污染物的看法。他们对动画的幻灯片时presenting下一个视图,然后将其滑回,当你打了退堂鼓。这个想法是,我需要保持周围的previous意见。另一个比喻是UINavigationControllers iOS上是如何工作的。
Is it possible to dynamically add and remove regions to a layout with Marionette? My app needs to be able to push and pop regions from a layout. This is similar to how GitHub pushes and pops views when you drill down in the source code of a project. They have the slide over animation when presenting the next view and then it slides back when you're backing out. The idea is that I need to keep the previous views around. Another analogy would be how UINavigationControllers work on iOS.
或者,也许我应该只是定义了一个自定义布局,能够处理动态添加和删除地区?
Or maybe I should just define a custom layout that is able to handle adding and removing regions on the fly?
推荐答案我最终实现一个容器,以适合我的需要。像你的木偶期望它清理事件裁判。
I ended up implementing a container view to fit my needs. It cleans up event refs like you'd expect in Marionette.
github/ayoung/backbone-vs-marionette/blob/marionette/public/js/views/mainContainer.js
更多推荐
动态添加/删除地区布局
发布评论