Skip to content

A custom NgElementStrategyFactory to enable zone-based change detection for Angular Elements

License

Notifications You must be signed in to change notification settings

tnicola/elements-zone-strategy

 
 

Repository files navigation

elements-zone-strategy

This library provides an Angular Elements Strategy Factory which always runs in the NgZone, allowing automatic change detection

Usage

import { ElementZoneStrategyFactory } from 'elements-zone-strategy';

const strategyFactory = new ElementZoneStrategyFactory(HelloComponent, this.injector);
const helloElement = createCustomElement(HelloComponent, { injector: this.injector, strategyFactory });
customElements.define('my-hello', helloElement);

About

A custom NgElementStrategyFactory to enable zone-based change detection for Angular Elements

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 75.4%
  • JavaScript 18.8%
  • HTML 5.2%
  • CSS 0.6%