【发布时间】:2015-06-15 13:46:12
【问题描述】:
我有一个特殊情况。
假设我在root.com/product/1/detail
我希望能够更改产品动态段,但仍处于详细子路径中。例如 `root.com/product/2/detail
如果我在root.com/product/1,我希望将相同的转换代码转到`root.com/product/2
通常情况下,您会输入transitionToRoute('product', this.get('id')) 之类的内容,但这只会将我带到产品路线。我需要额外的灵活性来保留访问者当前可能所在的任何子路线。
也许有某种“currentRoute”属性我可以像transitionToRoute('controller.currentRoute', this.get('id')) 这样在为动态段传递新的ID 或对象时挂钩?
【问题讨论】:
标签: ember.js dynamic-url