elements-zone-strategy
TypeScript icon, indicating that this package has built-in type declarations

10.0.1 • Public • Published

elements-zone-strategy

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

license downloads

This library is no longer needed for Angular versions 10.1 and above!

see: here

This addresses the following issues with @angular/elements:

Usage

install the package:

npm install --save elements-zone-strategy

use the new strategy:

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);

Versions

Not needed in Angular 11

use version 10.0.0 for Angular 10 (not needed as of 10.1)

use version 9.0.0 for Angular 9

use version 8.0.0 for Angular 6-8

Package Sidebar

Install

npm i elements-zone-strategy

Weekly Downloads

2,416

Version

10.0.1

License

MIT

Unpacked Size

40.2 kB

Total Files

17

Last publish

Collaborators

  • remackgeek