We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ERROR Error: Uncaught (in promise): ReferenceError: window is not defined ReferenceError: window is not defined
Getting ReferenceError for window with ssr build.
window
"@angular/animations": "^14.2.0", "@angular/cdk": "^14.2.4", "@angular/common": "^14.2.0", "@angular/compiler": "^14.2.0", "@angular/core": "^14.2.0", "@angular/forms": "^14.2.0", "@angular/material": "^14.2.4", "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/platform-server": "^14.2.0", "@angular/router": "^14.2.0", "@nguniversal/express-engine": "^14.2.0" "masonry-layout": "^4.2.2", "ngx-masonry": "^14.0.1"
import { NgxMasonryModule } from 'ngx-masonry'; @NgModule({ declarations: [HomeComponent], imports: [ NgxMasonryModule, CommonModule, AppRoutingModule, MatButtonModule, MatIconModule, MatCardModule, ], }) export class AppModule {}
Is it not compatible with SSR? or am i missing something
The text was updated successfully, but these errors were encountered:
It is works with SSR. Add the following code to "server.ts":
global['window'] = window; global['document'] = window.document;
Sorry, something went wrong.
still getting same error
I have the same issue with version 14. (With version 13 it works) I added the requested global definitions but I still have the issue
No branches or pull requests
Getting ReferenceError for
window
with ssr build.Is it not compatible with SSR? or am i missing something
The text was updated successfully, but these errors were encountered: