angular-cn/packages
Misko Hevery 737506e79c fix(core): Allow modification of lifecycle hooks any time before bootstrap (#35464)
Currently we read lifecycle hooks eagerly during `ɵɵdefineComponent`.
The result is that it is not possible to do any sort of meta-programing
such as mixins or adding lifecycle hooks using custom decorators since
any such code executes after `ɵɵdefineComponent` has extracted the
lifecycle hooks from the prototype. Additionally the behavior is
inconsistent between AOT and JIT mode. In JIT mode overriding lifecycle
hooks is possible because the whole `ɵɵdefineComponent` is placed in
getter which is executed lazily. This is because JIT mode must compile a
template which can be specified as `templateURL` and those we are
waiting for its resolution.

- `+` `ɵɵdefineComponent` becomes smaller as it no longer needs to copy
  lifecycle hooks from prototype to `ComponentDef`
- `-` `ɵɵNgOnChangesFeature` feature is now always included with the
  codebase as it is no longer tree shakable.

Previously we have read lifecycle hooks from prototype in the
`ɵɵdefineComponent` so that lifecycle hook access would be monomorphic.
This decision was made before we had `T*` data structures. By not
reading the lifecycle hooks we are moving the megamorhic read form
`ɵɵdefineComponent` to instructions. However, the reads happen on
`firstTemplatePass` only and are subsequently cached in the `T*` data
structures. The result is that the overall performance should be same
(or slightly better as the intermediate `ComponentDef` has been
removed.)

- [ ] Remove `ɵɵNgOnChangesFeature` from compiler. (It will no longer
      be a feature.)
- [ ] Discuss the future of `Features` as they hinder meta-programing.

Fix #30497

PR Close #35464
2020-07-15 16:22:46 -07:00
..
animations Revert "build: remove wombot proxy registry from package.jsons for release (#37378)" (#37495) 2020-06-10 08:21:45 -07:00
bazel build: remove obsolete Bazel function ctx.new_file (#38080) 2020-07-15 12:39:00 -07:00
benchpress build: add wombot proxy for publish config for @angular/benchpress (#37752) 2020-06-25 17:08:18 -07:00
common fix(http): avoid abort a request when fetch operation is completed (#37367) 2020-06-25 12:09:39 -07:00
compiler fix(core): incorrectly validating properties on ng-content and ng-container (#37773) 2020-07-15 12:39:39 -07:00
compiler-cli fix(core): incorrectly validating properties on ng-content and ng-container (#37773) 2020-07-15 12:39:39 -07:00
core fix(core): Allow modification of lifecycle hooks any time before bootstrap (#35464) 2020-07-15 16:22:46 -07:00
docs docs(di): fix typo in advanced di doc (#36634) 2020-05-01 09:50:28 -07:00
elements fix(elements): fire custom element output events during component initialization (#37570) 2020-06-29 10:33:40 -07:00
examples feat(zone.js): upgrade zone.js to angular package format(APF) (#36540) 2020-06-11 11:08:48 -07:00
forms refactor(forms): remove unnecessary `!` operators from validators (#36805) 2020-07-14 11:01:53 -07:00
language-service fix(language-service): remove completion for string (#37983) 2020-07-13 14:16:56 -07:00
localize fix(compiler-cli): ensure file_system handles mixed Windows drives (#37959) 2020-07-13 12:05:21 -07:00
misc/angular-in-memory-web-api build: import in-memory-web-api project (#37182) 2020-06-15 14:28:37 -07:00
platform-browser docs: update api ref doc for platform browser (#37186) 2020-06-11 18:59:12 -07:00
platform-browser-dynamic Revert "build: remove wombot proxy registry from package.jsons for release (#37378)" (#37495) 2020-06-10 08:21:45 -07:00
platform-server feat(platform-server): add option for absolute URL HTTP support (#37539) 2020-06-25 14:26:09 -07:00
platform-webworker Revert "build: remove wombot proxy registry from package.jsons for release (#37378)" (#37495) 2020-06-10 08:21:45 -07:00
platform-webworker-dynamic Revert "build: remove wombot proxy registry from package.jsons for release (#37378)" (#37495) 2020-06-10 08:21:45 -07:00
private/testing build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
router docs: update reference doc for router guards and resolvers (#38079) 2020-07-15 12:32:10 -07:00
service-worker docs(service-worker): fix typos in `SwRegistrationOptions` API docs (#38047) 2020-07-15 13:10:25 -07:00
upgrade Revert "build: remove wombot proxy registry from package.jsons for release (#37378)" (#37495) 2020-06-10 08:21:45 -07:00
zone.js feat(dev-infra): add bazel firefox browser with RBE compatibility (#38029) 2020-07-15 12:34:05 -07:00
BUILD.bazel build: reference zone.js from source directly instead of npm. (#33046) 2019-11-06 00:48:34 +00:00
README.md docs: add doc reference to npm package readme (#33911) 2019-11-20 14:46:23 -08:00
circular-deps-test.conf.js build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
empty.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
goog.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
license-banner.txt build: bump year (#34651) 2020-01-13 07:21:43 -08:00
system.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04: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 build: import in-memory-web-api project (#37182) 2020-06-15 14:28:37 -07:00
types.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00

README.md

Angular

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

Usage information and reference details can be found in Angular documentation.

License: MIT