Angular anti-patterns #01: Subscribing to every observable

Rxjs is probably the most difficult thing to grasp when starting out with angular. For that reason often times the benefits of rxjs are not used and code like the following is written. @Component({ selector: 'app-subscribing-to-everything-bad', standalone: true, imports: [CommonModule], template: ` <h3>Bad</h3> <p>{{result}}</p> ` }) export class SubscribingToEverythingBadComponent { result: string | undefined; constructor(someService: SomeServiceService) { someService.loadSomething().subscribe((result) => { this.result = result; }); } } The first thing that comes to ones mind when seeing observables would be to subscribe to get the value out of there....

<span title='2022-11-17 00:00:00 +0000 UTC'>November 17, 2022</span>