Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accessing currentPath from application controller has been deprecated #973

Closed
gokatz opened this issue May 24, 2019 · 6 comments · Fixed by #975
Closed

accessing currentPath from application controller has been deprecated #973

gokatz opened this issue May 24, 2019 · 6 comments · Fixed by #975
Labels

Comments

@gokatz
Copy link

gokatz commented May 24, 2019

We tried to access currentPath here and these such access has been deprecated in 3.10. Can we use the router implementation instead ?

@RobbieTheWagner
Copy link
Member

@gokatz this is in ember_debug code, which needs to support back to Ember 2.7. We may need a conditional that checks the Ember version and uses different logic based on the version. If you wanted to try switching to the other implementation, it is possible it might work. I am away until June 3rd, and won't have a ton of time to look into this until then.

cc @rwjblue @pzuraq

@rwjblue
Copy link
Member

rwjblue commented May 24, 2019

Ya, the router service only works from 2.15+.

I think the simplest fix is to update:

currentPath: readOnly('applicationController.currentPath'),

To use namespace.owner.router.currentPath instead. It has been around since 2.1 (added in this commit).

@gokatz
Copy link
Author

gokatz commented May 27, 2019

That's super fast. Thanks @rwwagner90 and @rwjblue 🍾

@RobbieTheWagner
Copy link
Member

@gokatz we aim to please 😄

@RobbieTheWagner
Copy link
Member

Is everything working well for you now?

@gokatz
Copy link
Author

gokatz commented May 27, 2019

Yeah. Works perfectly. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants