maciejtreder / ng-toolkit

:star: Angular tool-box! Start your PWA in two steps! Add Serverless support for existing projects and much more
https://www.angular-universal-pwa.maciejtreder.com
MIT License
1.12k stars 156 forks source link

NullInjectorError: No provider for InjectionToken ng-toolkit-window! #836

Open tohedul opened 4 years ago

tohedul commented 4 years ago

I'm submitting a...


[ ] Bug report 

In package


[ ] @ng-toolkit/universal

Current behavior

When I am trying to inject "@Inject(WINDOW) private window: Window" through constructor it's throwing the error "

Special mention

hello, @maciejtreder I am working on an angular 10 project. Trying to implement angular ssr by using your "@ng-toolkit/universal" package to solve global variables(window, document, localStorage) issue in ssr. But I'm getting " NullInjectorError". I didn't find any solution nowhere. Hope I'll hear from you soon.

Environment


Angular version: 10.0.3