question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

accessing currentPath from application controller has been deprecated

See original GitHub issue

We 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:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
rwjbluecommented, May 24, 2019

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).

1reaction
rwwagner90commented, May 24, 2019

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found