You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Angular's metadata decorators (@Componentetc) aren't really runtime decorators, they're used more like "annotations". Angular tooling has the ability to "downlevel" these decorannoations into static class properties, which are then read by Angular's reflector.
Applications using Google Closure Compiler with Angular's ngc can opt into downleveling specifically marked decorators into static properties. This change enables that usage.
Closes#93
Angular's metadata decorators (
@Component
etc) aren't really runtime decorators, they're used more like "annotations". Angular tooling has the ability to "downlevel" these decorannoations into static class properties, which are then read by Angular's reflector.This is accomplished w/ a JSDoc annotation - see https://github.com/angular/angular/blob/a80ac0a8d3238f483a05252c437d4b321c42f5c7/packages/core/src/metadata/directives.ts#L67-L68
When run through
ngc
with theannotateForClosureCompiler
option, usages of decorators tagged with this JSDoc are rewritten:used like
downlevels to
For full closure compatibility, we need to implement the same functionality - at runtime, we just need to check those static properties before checking via
Reflect
, as seen in : https://github.com/angular/angular/blob/master/packages/core/src/reflection/reflection_capabilities.ts#L73-L85internal bug : b/63801869
The text was updated successfully, but these errors were encountered: