MCPcopy
hub / github.com/rx-angular/rx-angular / ngOnInit

Method ngOnInit

libs/template/let/src/lib/let.directive.ts:541–563  ·  view source on GitHub ↗

@internal

()

Source from the content-addressed store, hash-verified

539
540 /** @internal */
541 ngOnInit() {
542 this.subscription.add(
543 this.templateManager
544 .render(merge(this.values$, this.templateNotification$))
545 .subscribe((n) => {
546 this.rendered$.next(n);
547 this._renderObserver?.next(n);
548 }),
549 );
550 this.subscription.add(
551 merge(
552 this.contextTrigger || NEVER,
553 this.nextTrigger?.pipe(map(() => RxNotificationKind.Next)) || NEVER,
554 this.suspenseTrigger?.pipe(map(() => RxNotificationKind.Suspense)) ||
555 NEVER,
556 this.completeTrigger?.pipe(map(() => RxNotificationKind.Complete)) ||
557 NEVER,
558 this.errorTrigger?.pipe(map(() => RxNotificationKind.Error)) || NEVER,
559 )
560 .pipe(filter((v) => !!v))
561 .subscribe((t) => this.triggerHandler.next(t)),
562 );
563 }
564
565 /** @internal */
566 ngOnChanges(changes: SimpleChanges) {

Callers

nothing calls this directly

Calls 4

subscribeMethod · 0.80
renderMethod · 0.65
nextMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected