6 Commits

Author SHA1 Message Date
George Kalpakas
bdce7698fc fix(elements): update the view of an OnPush component when inputs change ()
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 

PR Close 
2020-11-06 09:31:46 -08:00
George Kalpakas
c1907809a8 test(elements): add integration tests for Angular Elements using ShadowDom ()
Previously, the project used for running integration tests for Angular
Elements declared a component that used `ShadowDom` for view
encopsulation, but it did not include any tests to verify that the view
was updated correctly.

This commit adds the missing tests.

PR Close 
2020-11-06 09:31:46 -08:00
George Kalpakas
53bae68617 test: make elements integration tests less flaky ()
PR Close 
2018-11-02 10:37:34 -07:00
Pawel Kozlowski
053bf27fb3 refactor(ivy): use context discovery in TestBed implementation ()
PR Close 
2018-10-11 13:01:28 -07:00
Rob Wormald
c9844a2f01 feat(elements): enable Shadow DOM v1 and slots ()
When using ViewEncapsulation.ShadowDom, Angular will not remove the child nodes of the DOM node a root Component is bootstrapped into. This enables developers building Angular Elements to use the `<slot>` element to do native content projection.

PR Close 
2018-08-30 21:33:14 -07:00
Rob Wormald
4815b92495 test(elements): add basic integration test for angular elements ()
PR Close 
2018-08-30 21:33:14 -07:00