|
1 |
| -import { Injector } from '@angular/core'; |
2 |
| -import { |
3 |
| - NgElementStrategy, |
4 |
| - NgElementStrategyEvent, |
5 |
| - NgElementStrategyFactory, |
6 |
| -} from '@angular/elements'; |
7 |
| -import { Observable, of, Subject, ReplaySubject } from 'rxjs'; |
8 |
| -import { take, takeUntil, timeoutWith, switchAll } from 'rxjs/operators'; |
| 1 | +import { ComponentRef, Injector } from '@angular/core'; |
| 2 | +import { NgElementStrategy, NgElementStrategyFactory } from '@angular/elements'; |
| 3 | +import { of, Subject } from 'rxjs'; |
| 4 | +import { take, takeUntil, timeoutWith } from 'rxjs/operators'; |
9 | 5 |
|
10 | 6 | import {
|
11 | 7 | ElementBoundaryNgElementStrategy,
|
@@ -73,6 +69,11 @@ export class CrossBoundaryNgElementStrategy implements NgElementStrategy {
|
73 | 69 | // so we are using late initialization of stream
|
74 | 70 | events = maybeLateInitStream(this.baseStrategy, 'events');
|
75 | 71 |
|
| 72 | + // Get `ComponentRef` from the base strategy |
| 73 | + get componentRef(): ComponentRef<any> | undefined { |
| 74 | + return this.baseStrategy.getComponentRef(); |
| 75 | + } |
| 76 | + |
76 | 77 | private elementBoundaryService: ElementBoundaryService = this.hookableInjector.get(
|
77 | 78 | ElementBoundaryService,
|
78 | 79 | );
|
|
0 commit comments