emberjs / emberjs/ember.js

Router Service: Behaves differently in engine context regarding route path

Open
#17,014 5 comments 0 reactions 0 assignees View on GitHub
bug good first issue Routing
Dominant language
TypeScript
Stars
22.6k
Forks
4.2k
Avg merge
3d 12h
Merged PRs (30d)
15

Description

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!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.