My project was running perfectly but when i implement universal then i am getting \"window is not defined\".
My error is as below.
node_modules/hamm
Because Angular Universal allows you to create server-side rendered pages. And in a server, you don't have a browser, therefore you don't have a window.
You should make a condition to test if the window exists, something like this
if (window) { /* do your window things here */}