This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| assertInInjectionContext, | |
| assertNotInReactiveContext, | |
| inject, | |
| INJECTOR, | |
| type Injector, | |
| type Signal, | |
| } from '@angular/core'; | |
| import { toObservable, toSignal } from '@angular/core/rxjs-interop'; | |
| import { debounceTime } from 'rxjs'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { afterRenderEffect, DestroyRef, Directive, ElementRef, inject, input } from '@angular/core'; | |
| @Directive({ selector: 'ng-teleport' }) | |
| export class Teleport { | |
| private readonly destroyRef = inject(DestroyRef); | |
| private readonly el: HTMLElement /* https://github.com/angular/angular/issues/53894 */ = inject( | |
| ElementRef<HTMLElement> | |
| ).nativeElement; | |
| readonly to = input.required<string>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| afterNextRender, | |
| type AfterRenderRef, | |
| assertInInjectionContext, | |
| assertNotInReactiveContext, | |
| type CreateEffectOptions, | |
| effect, | |
| type EffectCleanupRegisterFn, | |
| type EffectRef, | |
| inject, |