-
Notifications
You must be signed in to change notification settings - Fork 182
Closed
Description
| registerAccountCallback: window.location.href, |
Reference to the window object makes it impossible to use angular-token on Angular Universal applications.
Would you accept the pull request, if I inject PLATFORM_ID to conditionally mock the reference to window.location while rendering on the server side?
Something like this:
constructor(
@Inject(PLATFORM_ID) private platformId: Object
) {
this.isServerSideRendering = isPlatformServer(platformId);
if (this.isServerSideRendering) {
// mock window.location
}
}Metadata
Metadata
Assignees
Labels
No labels