accessing currentPath from application controller has been deprecated
See original GitHub issueWe tried to access currentPath
here and these such access has been deprecated in 3.10. Can we use the router implementation instead ?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Fix Ember deprecations #10651 - TryGhost/Ghost - GitHub
"DEPRECATION: Accessing currentPath on controller:application is deprecated, use the currentPath property on service:router instead" ...
Read more >Deprecations Added in Ember 3.x
Private property Route.router has been renamed to Route. ... the currentPath and currentRouteName properties of the ApplicationController , you can get the ...
Read more >How would i dynamically fetch a property from another controller ...
Considering that if you were to do it without alias you should do: this.get('controllers.application').get('currentPath').get('title'). I would say just try
Read more >How do I get the current path alias or path? - Drupal Answers
Since Drupal 8.8.0, the path.alias_manager has been deprecated in favor of the new service path_alias.manager ...
Read more >Red Hat OpenShift Pipelines release notes
In Red Hat OpenShift Pipelines 1.8, the previously deprecated Conditions resource type has been removed. Remove the Conditions resource from Pipeline resource ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ya, the router service only works from 2.15+.
I think the simplest fix is to update:
https://github.com/emberjs/ember-inspector/blob/65409c9ab2084899fb4eb48e222fb6e1f77c048b/ember_debug/route-debug.js#L29
To use
namespace.owner.router.currentPath
instead. It has been around since 2.1 (added in this commit).@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