angular-cn/packages
Alex Rickabaugh b381497126 feat(ngcc): add a migration for undecorated child classes (#33362)
In Angular View Engine, there are two kinds of decorator inheritance:

1) both the parent and child classes have decorators

This case is supported by InheritDefinitionFeature, which merges some fields
of the definitions (such as the inputs or queries).

2) only the parent class has a decorator

If the child class is missing a decorator, the compiler effectively behaves
as if the parent class' decorator is applied to the child class as well.
This is the "undecorated child" scenario, and this commit adds a migration
to ngcc to support this pattern in Ivy.

This migration has 2 phases. First, the NgModules of the application are
scanned for classes in 'declarations' which are missing decorators, but
whose base classes do have decorators. These classes are the undecorated
children. This scan is performed recursively, so even if a declared class
has a base class that itself inherits a decorator, this case is handled.

Next, a synthetic decorator (either @Component or @Directive) is created
on the child class. This decorator copies some critical information such
as 'selector' and 'exportAs', as well as supports any decorated fields
(@Input, etc). A flag is passed to the decorator compiler which causes a
special feature `CopyDefinitionFeature` to be included on the compiled
definition. This feature copies at runtime the remaining aspects of the
parent definition which `InheritDefinitionFeature` does not handle,
completing the "full" inheritance of the child class' decorator from its
parent class.

PR Close #33362
2019-10-25 09:16:50 -07:00
..
animations feat: typescript 3.6 support (#32946) 2019-10-18 13:15:16 -04:00
bazel refactor(bazel): add missing comment about JS providers to ng_module.bzl (#33332) 2019-10-24 10:18:04 -07:00
benchpress feat: update rxjs peerDependencies minimum requirment to 6.5.3 (#32812) 2019-10-01 14:56:45 -07:00
common perf(ivy): apply [style]/[class] bindings directly to style/className (#33336) 2019-10-24 17:42:46 -07:00
compiler feat(ngcc): add a migration for undecorated child classes (#33362) 2019-10-25 09:16:50 -07:00
compiler-cli feat(ngcc): add a migration for undecorated child classes (#33362) 2019-10-25 09:16:50 -07:00
core feat(ivy): add a runtime feature to copy cmp/dir definitions (#33362) 2019-10-25 09:16:50 -07:00
docs refactor(core): remove deprecated Renderer (#33019) 2019-10-08 09:23:00 -07:00
elements feat: typescript 3.6 support (#32946) 2019-10-18 13:15:16 -04:00
examples test: clean up explicit dynamic query usages (#33015) 2019-10-17 16:10:10 -04:00
forms docs: clean up deprecation guide (#33338) 2019-10-23 09:11:13 -07:00
http feat: typescript 3.6 support (#32946) 2019-10-18 13:15:16 -04:00
language-service refactor(language-service): find expression ASTs using absolute spans (#33387) 2019-10-24 17:08:23 -07:00
localize feat(ivy): i18n - inline current locale at compile-time (#33314) 2019-10-24 10:16:26 -07:00
platform-browser feat: typescript 3.6 support (#32946) 2019-10-18 13:15:16 -04:00
platform-browser-dynamic feat: typescript 3.6 support (#32946) 2019-10-18 13:15:16 -04:00
platform-server feat: typescript 3.6 support (#32946) 2019-10-18 13:15:16 -04:00
platform-webworker feat: typescript 3.6 support (#32946) 2019-10-18 13:15:16 -04:00
platform-webworker-dynamic feat: typescript 3.6 support (#32946) 2019-10-18 13:15:16 -04:00
private/testing test(ivy): add onlyInIvy perf counter expectations (#30339) 2019-05-09 11:22:00 -07:00
router fix(router): adjust UrlTree redirect to replace URL if in eager update (#32988) 2019-10-18 14:42:21 -04:00
service-worker feat: typescript 3.6 support (#32946) 2019-10-18 13:15:16 -04:00
upgrade feat: typescript 3.6 support (#32946) 2019-10-18 13:15:16 -04:00
zone.js build: remove vendored Babel typings (#33226) 2019-10-17 18:45:52 -04:00
BUILD.bazel refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
README.md Revert "docs: Remove unneeded file (#18106)" 2017-07-20 16:46:47 -05:00
empty.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
goog.d.ts fix(ivy): use goog.LOCALE for Closure Compiler to define default LOCALE_ID (#31519) 2019-07-16 13:02:10 -04:00
license-banner.txt build: bump year (#27880) 2019-01-11 11:15:59 -08:00
system.d.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
tsconfig-build-no-strict.json refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
tsconfig-build.json refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
tsconfig-test.json refactor: fix typescript strict flag failures in all tests (#30993) 2019-07-18 14:21:26 -07:00
tsconfig.json test(language-service): Create proper test project (#32653) 2019-09-18 13:07:01 -07:00
types.d.ts build: switch to typescript's es2015 typings (#28570) 2019-02-06 14:17:55 -05:00

README.md

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

License: MIT