diff --git a/projects/ngx-element-boundary/element-strategy/default/src/element-boundary-ng-element-strategy.ts b/projects/ngx-element-boundary/element-strategy/default/src/element-boundary-ng-element-strategy.ts index eed2ef6..4f74fca 100644 --- a/projects/ngx-element-boundary/element-strategy/default/src/element-boundary-ng-element-strategy.ts +++ b/projects/ngx-element-boundary/element-strategy/default/src/element-boundary-ng-element-strategy.ts @@ -1,9 +1,14 @@ import { ComponentRef, Injector, Type } from '@angular/core'; -import { NgElementStrategy, NgElementStrategyFactory } from '@angular/elements'; +import { + NgElementStrategy, + NgElementStrategyEvent, + NgElementStrategyFactory, +} from '@angular/elements'; import { ElementBoundaryNgElementStrategy, ElementBoundaryNgElementStrategyFactory, } from 'ngx-element-boundary'; +import { Observable } from 'rxjs'; import { DefaultNgElementStrategyFactory, @@ -59,7 +64,13 @@ export class DefaultElementBoundaryNgElementStrategyOptionsDefault */ export class DefaultElementBoundaryNgElementStrategy implements ElementBoundaryNgElementStrategy { - events = this.defaultStrategy.events; + get events() { + return this.defaultStrategy.events; + } + + set events(events: Observable) { + this.defaultStrategy.events = events; + } private options: DefaultElementBoundaryNgElementStrategyOptionsDefault; diff --git a/projects/ngx-element-boundary/src/lib/cross-boundary-ng-element-strategy.ts b/projects/ngx-element-boundary/src/lib/cross-boundary-ng-element-strategy.ts index e838991..f8ee29f 100644 --- a/projects/ngx-element-boundary/src/lib/cross-boundary-ng-element-strategy.ts +++ b/projects/ngx-element-boundary/src/lib/cross-boundary-ng-element-strategy.ts @@ -1,6 +1,10 @@ import { Injector } from '@angular/core'; -import { NgElementStrategy, NgElementStrategyFactory } from '@angular/elements'; -import { of, Subject } from 'rxjs'; +import { + NgElementStrategy, + NgElementStrategyEvent, + NgElementStrategyFactory, +} from '@angular/elements'; +import { Observable, of, Subject } from 'rxjs'; import { take, takeUntil, timeoutWith } from 'rxjs/operators'; import { @@ -63,7 +67,13 @@ export class CrossBoundaryNgElementStrategyOptionsDefault * To disable the timeout you may set it to `0` (zero, number) */ export class CrossBoundaryNgElementStrategy implements NgElementStrategy { - events = this.baseStrategy.events; + get events() { + return this.baseStrategy.events; + } + + set events(events: Observable) { + this.baseStrategy.events = events; + } private elementBoundaryService: ElementBoundaryService = this.hookableInjector.get( ElementBoundaryService,