ember-learn / ember-learn/guides-source
Example in guide suggests accessing controller in route, which causes linter error
- Dominant language
- HTML
- Stars
- 161
- Forks
- 512
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 4
Description
The example on [Preventing Transitions via willTransition](https://guides.emberjs.com/release/routing/preventing-and-retrying-transitions/#toc_preventing-transitions-via-willtransition) is using `this.controller` from inside route `willTransition`. This behaviour is flagged as error [ember/no-controller-access-in-routes](https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-controller-access-in-routes.md) by es-lint.
```
error Do not access controller in route outside of setupController/resetController ember/no-controller-access-in-routes
```
Is there a better (not discouraged) way to implement the example? Or should the linter take this use case into account?
Contributor guide
Assessment
This issue has not been assessed yet.