DEV Community

Discussion on: Angular Ivy: a detailed introduction

Collapse
layzee profile image
Lars Gyrup Brink Nielsen • Edited on

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.

Collapse
eugeniolentini profile image
Eugenio Lentini Author

Really nice hint! I will have a look, I am working a post about compiler pipeline.

Collapse
layzee profile image
Lars Gyrup Brink Nielsen

Oh dear, I just discovered that this export was called ɵNG_COMPONENT_DEF in Angular version 8, but is renamed to ɵNG_COMP_DEF in Angular version 9 😔