goetzrobin / spartan

Cutting-edge tools powering Angular full-stack development.
https://spartan.ng
MIT License
1.09k stars 120 forks source link

ERROR RuntimeError: NG0203: inject() must be called from an injection context such as a constructor #271

Open benpsnyder opened 2 months ago

benpsnyder commented 2 months ago

Please provide the environment you discovered this bug in.

Build process related to static pages

Which area/package is the issue in?

Don't know / other

Description

Angular static pages

Please provide the exception or error you saw

ERROR RuntimeError: NG0203: inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`. Find more at https://angular.io/errors/NG0203

Other information

I'll be working on it and closing this issue.

I would be willing to submit a PR to fix this issue