Multiple routers in ember.js?

穿精又带淫゛_ 提交于 2019-12-21 03:37:14

问题


In my app I have a requirement for a functional area to open in an overlay such that it sits on top of the current route which could be almost any other route in the app.

This functional area will have it's own routes as it contains at least a master-detail view.

What is the current best practice for dealing with this situation?

Is it possible to have top-level routes that don't tear down the current route/views when entering them? If not and it's necessary to have the ApplicationController (or similar) handle the globally accessible overlay, what's the best way to achieve router-like functionality for that area?


回答1:


I think you got confused by open in overlay requirement and you are trying to solve non-existing problem.

Opening messaging functionality in another page in your app or opening it as overlay on top of the app is just a design thing that should be handled by CSS and existing app router. Just create messaging route, controller, etc.

You didn't say that, but in case you want to boot separate application there, the best approach is to open it in the iframe. New app, new lifecycle, etc. Again, how you display it inside another app is just matter of CSS.



来源:https://stackoverflow.com/questions/16415686/multiple-routers-in-ember-js

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!