👨🏫 Co-Founder of This is Learning, Organizer of AarhusJS
✍️ Writer, Speaker, FOSS Maintainer 📗 Author
🏆 Microsoft MVP 🌟 GitHub Star
🌊 Nx Champion 🦸 Angular Hero of Education
New finding: The ngComponentDef/ɵcmp key can be determined by importing ɵNG_COMP_DEF from @angular/core. So in version 8, ɵNG_COMP_DEF would evaluate to 'ngComponentDef' whereas it would evalute to 'ɵcmp' in Angular version 9.
There are similar key constants for directives, pipes, and Angular modules.
👨🏫 Co-Founder of This is Learning, Organizer of AarhusJS
✍️ Writer, Speaker, FOSS Maintainer 📗 Author
🏆 Microsoft MVP 🌟 GitHub Star
🌊 Nx Champion 🦸 Angular Hero of Education
New finding: The
ngComponentDef/ɵcmpkey can be determined by importingɵNG_COMP_DEFfrom@angular/core. So in version 8,ɵNG_COMP_DEFwould evaluate to'ngComponentDef'whereas it would evalute to'ɵcmp'in Angular version 9.There are similar key constants for directives, pipes, and Angular modules.
Really nice hint! I will have a look, I am working a post about compiler pipeline.
Oh dear, I just discovered that this export was called
ɵNG_COMPONENT_DEFin Angular version 8, but is renamed toɵNG_COMP_DEFin Angular version 9 😔