I wanted to dynamically change the metatags in view page source which is possible through SSR when using this it gives this error but document is successfully running in angular. I am using angular 16
ReferenceError: document is not defined
at enableDismissTrigger (/Users/bingeabletech/Desktop/Office_Github/Bingeable/3.0-frontend/dist/server/main.js:1:526206)
at 80277 (/Users/bingeabletech/Desktop/Office_Github/Bingeable/3.0-frontend/dist/server/main.js:1:527231)
at webpack_require (/Users/bingeabletech/Desktop/Office_Github/Bingeable/3.0-frontend/dist/server/main.js:1:3704448)
at /Users/bingeabletech/Desktop/Office_Github/Bingeable/3.0-frontend/dist/server/main.js:1:3903011
at /Users/bingeabletech/Desktop/Office_Github/Bingeable/3.0-frontend/dist/server/main.js:1:3942803
at Object. (/Users/bingeabletech/Desktop/Office_Github/Bingeable/3.0-frontend/dist/server/main.js:1:3943035)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12)
Node.js v18.20.4
Can we render only specific component of angular in node?/ Does this error actually causing due to document or some other dependecy is causing issue?
alishba iftikhar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.