ember-cli / ember-cli/eslint-plugin-ember
Question about recommended way to access a controller from a route given `no-controller-access-in-routes` rule
- Dominant language
- JavaScript
- Stars
- 263
- Forks
- 214
- Avg merge
- 30m
- Merged PRs (30d)
- 5
Description
Accessing `this.controllerFor()` property inside `setupController/resetController` method in a route class raises a lint error ( `no-controller-access-in-routes`). Is that the expected behavior and if yes, how can one access another controller in a route class.
I am accessing the controller to setup route transition redirect like [this](https://guides.emberjs.com/release/routing/preventing-and-retrying-transitions/#toc_storing-and-retrying-a-transition) (I could opt to use query params or disable the lint on the affected LOC but is there an option to access another controller in a route)

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.