IDEMSInternational / open-app-builder

PLH App Frontend
GNU General Public License v3.0
5 stars 24 forks source link

fix: cdr injection #2223

Closed chrismclarke closed 4 months ago

chrismclarke commented 4 months ago

PR Checklist

Description

Fix regression from #2221 where calls to change detection mechanisms fail for popup templates.

The likely reason for this is the changeDetector is being called during service constructor methods, which can happen before the app has had a chance to inject the changeDetector (likely happens after all other constructors).

This fix defers retrieval until after explicitly required for a template, and changes the emitDecoratorMetadata tsconfig setting which has been linked to similar issues and removed in default angular starter templates (although I think it now defaults to false anyway when using esbuild, but possibly not webpack compiler)

Review Notes

Should check before/after running any deployment that processes startup templates

Git Issues

Closes #2222 (previous fix attempt)

Screenshots/Videos

If useful, provide screenshot or capture to highlight main changes