物品模态界面 [英] Item modal interface

查看:87
本文介绍了物品模态界面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



要求:




  • URL应该更新(因此我应该使用路由)

  • 现有的项目列表应该仍然在后台显示(因此模态接口)



然而,当使用路由时,最后使用的路由将自动关闭。



注意,有6条路线都显示了一个项目列表。
使项目路线所有这些路线的孩子会有点麻烦。



到目前为止,我已经阅读了这些API文档,没有找到我'寻找:





如果您不知道答案,但有很好的分享链接,请执行



可能的解决方案




  • 在IRC上,建议简单地渲染使用渲染调用进行模态(参见上面的链接)。但是,如果没有触发DOM更新,我如何更改ember中的URL? (相关问题,更改URL而不触发DOM更新


解决方案

这是一个粗略的例子,显示一个项目列表和一个模态的选定项目。



http://emberjs.jsbin .com / hesubejamayo / 1 / edit



结合以下帖子,我想您可能会实现您要查找的内容。



Ember Routing:重新使用多个父路由下的资源


I have a list of items and want to render the item template in a modal interface.

Requirements:

  • the URL should update (and hence I should use a Route)
  • the existing list of items should still be shown in the background (hence the modal interface)

However when using a route the last used route is automatically closed.

Note that there are 6 routes which all show a list of items. Making the item route a child of all these routes would be a bit cumbersome.

So far I've read through these API docs, without finding what I'm looking for:

If you dont know the answer, but have good links to share, please do

Possible solution

  • On IRC it was suggested to simply render a modal using the render call (see the above link). However how can I change the URL in ember without it triggering a DOM update? (related question, Change the URL without triggering a DOM update)

解决方案

This is a rough example of showing a list of items and the selected item on a modal.

http://emberjs.jsbin.com/hesubejamayo/1/edit

In combination with the following post i think you may achieve what you are looking for.

Ember Routing: Reusing a resource under multiple parent routes

这篇关于物品模态界面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆