Angular · Middle · Question 72 of 75
Why avoid subscribe inside a component just to copy values into fields?
ngOnInit() {
this.service.users$.subscribe((u) => (this.users = u));
}- ✓Correct answer: It needs manual unsubscribing and may not update OnPush views;
asyncpipe ortoSignalhandle both - 2
subscribeis deprecated - 3It sends the request twice
Explanation
Declarative bindings tie the subscription to the view's lifetime and notify change detection automatically.