refactor(core): rename ngComponentDef to ɵcmp (#33088)
Component defs are not considered public API, so the property that contains them should be prefixed with Angular's marker for "private" ('ɵ') to discourage apps from relying on def APIs directly. This commit adds the prefix and shortens the name from `ngComponentDef` to `cmp`. This is because property names cannot be minified by Uglify without turning on property mangling (which most apps have turned off) and are thus size-sensitive. Note that the other "defs" (ngDirectiveDef, etc) will be prefixed and shortened in follow-up PRs, in an attempt to limit how large and conflict-y this change is. PR Close #33088
This commit is contained in:

committed by
Miško Hevery

parent
d4d07233dc
commit
64fd0d6db9
@ -91,7 +91,7 @@ export class LocalModuleScopeRegistry implements MetadataRegistry, ComponentScop
|
||||
* Tracks whether a given component requires "remote scoping".
|
||||
*
|
||||
* Remote scoping is when the set of directives which apply to a given component is set in the
|
||||
* NgModule's file instead of directly on the ngComponentDef (which is sometimes needed to get
|
||||
* NgModule's file instead of directly on the component def (which is sometimes needed to get
|
||||
* around cyclic import issues). This is not used in calculation of `LocalModuleScope`s, but is
|
||||
* tracked here for convenience.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user