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:
3236ae0ee1/packages/upgrade/src/common/src/downgrade_component_adapter.ts (L146)
.
Fixes #38948
PR Close #39452
19 lines
335 B
HTML
19 lines
335 B
HTML
<!doctype html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Hello World</title>
|
|
<base href="/">
|
|
</head>
|
|
|
|
<body>
|
|
<input type="text">
|
|
<hello-world-el></hello-world-el>
|
|
<hello-world-onpush-el></hello-world-onpush-el>
|
|
<hello-world-shadow-el></hello-world-shadow-el>
|
|
<script src="dist/bundle.js"></script>
|
|
</body>
|
|
|
|
</html>
|