https://github.com/angular/angular
Revision dd28855455bad294282ed1c4e0bc55b7fca0f9b9 authored by George Kalpakas on 04 November 2020, 18:46:59 UTC, committed by Misko Hevery on 06 November 2020, 17:31:49 UTC
As with regular Angular components, Angular elements are expected to
have their views update when inputs change.

Previously, Angular Elements views were not updated if the underlying
component used the `OnPush` change detection strategy.

This commit fixes this by calling `markForCheck()` on the component
view's `ChangeDetectorRef`.

NOTE:
This is similar to how `@angular/upgrade` does it:
https://github.com/angular/angular/blob/3236ae0ee118d0734c90fa9f3767435396213470/packages/upgrade/src/common/src/downgrade_component_adapter.ts#L146.

Fixes #38948

PR Close #39452
1 parent ff925af
History
Tip revision: dd28855455bad294282ed1c4e0bc55b7fca0f9b9 authored by George Kalpakas on 04 November 2020, 18:46:59 UTC
fix(elements): update the view of an `OnPush` component when inputs change (#39452)
Tip revision: dd28855
File Mode Size
.circleci
.devcontainer
.github
.ng-dev
.vscode
.yarn
aio
dev-infra
docs
goldens
integration
modules
packages
scripts
third_party
tools
.bazelignore -rw-r--r-- 4.3 KB
.bazelrc -rw-r--r-- 6.2 KB
.bazelversion -rw-r--r-- 213 bytes
.clang-format -rw-r--r-- 73 bytes
.editorconfig -rw-r--r-- 245 bytes
.gitattributes -rw-r--r-- 314 bytes
.gitignore -rw-r--r-- 837 bytes
.gitmessage -rw-r--r-- 7.2 KB
.mailmap -rw-r--r-- 51 bytes
.nvmrc -rw-r--r-- 8 bytes
.pullapprove.yml -rw-r--r-- 45.8 KB
.yarnrc -rw-r--r-- 128 bytes
BUILD.bazel -rw-r--r-- 1.8 KB
CHANGELOG.md -rw-r--r-- 758.8 KB
CODE_OF_CONDUCT.md -rw-r--r-- 1.1 KB
CONTRIBUTING.md -rw-r--r-- 14.9 KB
LICENSE -rw-r--r-- 1.1 KB
README.md -rw-r--r-- 4.3 KB
WORKSPACE -rw-r--r-- 4.0 KB
browser-providers.conf.js -rw-r--r-- 8.4 KB
gulpfile.js -rw-r--r-- 1.3 KB
karma-js.conf.js -rw-r--r-- 7.8 KB
package.json -rw-r--r-- 8.4 KB
test-events.js -rw-r--r-- 259 bytes
test-main.js -rw-r--r-- 11.3 KB
tslint.json -rw-r--r-- 2.3 KB
yarn.lock -rw-r--r-- 698.0 KB
yarn.lock.readme.md -rw-r--r-- 1.3 KB

README.md

back to top