emberjs/ember.js

Router Service: Behaves differently in engine context regarding route path

开放

#17,014 创建于 2018年9月28日

 (5 条评论) (0 个反应) (0 位负责人)JavaScript (4,216 个派生)batch import
Routingbuggood first issue

仓库指标

星标
 (22,437 个星标)
PR 合并指标
 (平均合并 11天 14小时) (30 天内合并 20 个 PR)

描述

Hey there,

it seems like the router services behaves differently in an engine context compared to {{#link-to}} in views and transitionTo routes.

Example: I want to link to my engine's route called 'overview'. The engine is mounted as 'engine'.

This is the expected and documented behavior: Route: this.transitionTo('overview') Views: {{#link-to 'overview'}}Link{{/link-to}}

Whereas the service requires the mount point additionally: Service: this.routerService.transitionTo('engine.overview')

I think all three ways should require the same route path.

Versions:

  • ember-source: ~3.2.0
  • ember-engines: ~0.5.4

Hopefully, there's no other issue like that, but haven't found any while searching. Thanks!

贡献者指南