Uh oh!
There was an error while loading. Please reload this page.
fix(progress-bar): incorrectly handling current path when using hash location strategy - #12713
Merged
Merged
Conversation
| this._rectangleFillValue = `url('${location ? location.path() : ''}#${this.progressbarId}')`; | ||
| // because named route URLs can contain parentheses (see #12338). Also we don't use | ||
| // `Location` from `@angular/common`, because we can't tell the difference between whether | ||
| // the consumer is using the hash location strategy or not. |
Contributor
There was a problem hiding this comment.
Couldn't you do the same thing with location.path() from @angular/common's Location?
MemberAuthor
There was a problem hiding this comment.
That's what it used to do, but AFAIK Angular's location.path will normalize both of these to the same value: /#/foo/bar and /foo/bar.
Contributor
There was a problem hiding this comment.
Ah, got it. Can you expand the comment with that?
...the consumer is using the hash location strategy or not because it normalizes both
`/#/foo/bar` and `/foo/bar` to the same thing
…location strategy Fixes the progress bar prefixing the references incorrectly when the consumer is using the router's hash location strategy. The issue comes from the fact that the router normalizes the `location.pathname` between the regular strategy and the hash one, whereas we need to use the exact same path as the `window.location`. Fixesangular#12710.
crisbetoforce-pushed
the
12710/progress-bar-hash
branch
from
August 21, 2018 16:37
62b7288 to
a3f5206Comparejelbourn pushed a commit
that referenced
this pull request
Aug 29, 2018
…location strategy (#12713) Fixes the progress bar prefixing the references incorrectly when the consumer is using the router's hash location strategy. The issue comes from the fact that the router normalizes the `location.pathname` between the regular strategy and the hash one, whereas we need to use the exact same path as the `window.location`. Fixes#12710.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes the progress bar prefixing the references incorrectly when the consumer is using the router's hash location strategy. The issue comes from the fact that the
Locationnormalizes thelocation.pathnamebetween the regular strategy and the hash one, whereas we need to use the exact same path as thewindow.location.Fixes#12710.