-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
fix(progress-bar): generate correct url on server #12813
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/lib/progress-bar/progress-bar.ts
Outdated
@@ -49,7 +51,9 @@ export interface MatProgressBarLocation { | |||
|
|||
/** @docs-private */ | |||
export function MAT_PROGRESS_BAR_LOCATION_FACTORY(): MatProgressBarLocation { | |||
return typeof window !== 'undefined' ? window.location : {pathname: ''}; | |||
const doc = inject(DOCUMENT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename this to _document
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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. |
window.location
is unavailable on the server,document.location
is, and canbe injected in the provider for the progress bar