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

Method ngOnInit

libs/template/if/src/lib/if.directive.ts:499–521  ·  view source on GitHub ↗

@internal

()

Source from the content-addressed store, hash-verified

497
498 /** @internal */
499 ngOnInit() {
500 this.subscription.add(
501 merge(
502 this.contextTrigger || NEVER,
503 this.nextTrigger?.pipe(map(() => RxNotificationKind.Next)) || NEVER,
504 this.suspenseTrigger?.pipe(map(() => RxNotificationKind.Suspense)) ||
505 NEVER,
506 this.completeTrigger?.pipe(map(() => RxNotificationKind.Complete)) ||
507 NEVER,
508 this.errorTrigger?.pipe(map(() => RxNotificationKind.Error)) || NEVER,
509 )
510 .pipe(filter((v) => !!v))
511 .subscribe((t) => this.triggerHandler.next(t)),
512 );
513 this.subscription.add(
514 this.templateManager
515 .render(this.templateNotifier.values$)
516 .subscribe((n) => {
517 this.rendered$.next(n);
518 this._renderObserver?.next(n);
519 }),
520 );
521 }
522
523 /** @internal */
524 ngOnChanges(changes: SimpleChanges): void {

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected