Don't make my toSignal mistake in Angular

Опубликовано: 18 Октябрь 2024
на канале: Joshua Morony
8,317
585

My Angular course: https://angularstart.com/

I was trying to use toSignal in Angular with a global error handler service when I ran into some weird behaviour: when a single error occurred, I was getting tons of error messages spammed on the screen.

It turns out that this was due to the way toSignal handles errors from observable streams, that results in an error being thrown every time a signal is read

Get weekly content and tips exclusive to my newsletter: https://mobirony.ck.page/4a331b9076

Want to build mobile apps with Angular?: https://ionicstart.com

0:00 Introduction
1:03 The problem
1:38 Errors as values
2:04 rejectErrors

#angular #rxjs #signals

More tutorials: https://modernangular.com
Follow me on Twitter:   / joshuamorony