Learn Angular Signals RxJS Interop From a Practical Example

preview_player
Показать описание
In this video, you will learn how to use the RxJS interop library to convert an Observable source to a Signal, by creating a Material Typeahead.

More specifically, you will learn the following:
✨How to convert an RxJS source to a Signal
✨How to provide an argument to an RxJS source using a Signal
✨How to apply a basic error handling
✨How to display a loading indicator

Bonus 💯 Check the repo to find an advanced way to display a loading indicator

Chapters:
00:00 Intro
01:40 Create an RxJS source to a Signal
03:27 Provide an argument into an RxJS source via Signals
09:47 Apply a debouceTime RxJS operator
13:28 Basic error handling
14:34 Display a loading indicator
15:49 Thank you

******************************************************
Let's connect
******************************************************

#angular #learnAngular #angularTutorial #webdeveloper #webdevelopment #softwareengineer #softwaredeveloper #frontenddeveloper #frontenddevelopment
Рекомендации по теме
Комментарии
Автор

It's a good way to do it, but you can make it simple by doing this:  

userId = signal<number | undefined>(undefined);
posts$ =
debounceTime(200),
switchMap((userId) =>
);
posts = toSignal(this.posts$);


You don't even need the behaviour subject or the effect.

desenvolvimentoetecnologia
Автор

The first one that gives an actual full view example on signals and http request. Was looking for something like this the whole day, thank you for that!🥰

joaobentocandidobezerra
Автор

As always, a great overview and solutions on how signals can be used. More of them, please. Thanks for your great summary. 👍

luigidicarmino
Автор

Great explanations.
Thank you for sharing your knowledge

Nabulio
Автор

just trying it out and got to the point where the toSignal function will create a read only Signal and not a WritableSignal so need to change it around a bit, but thanks for the tutorial, good explanation

wiliamferraciolli
Автор

Would you kindly consider making a video about SSR and hydration?

aram
Автор

Hi, Fanis I'm Ridvan from Anixe;

It's a good example for rxjs and signals as a real-world example.
But it's looking like a bit nonreadable when there is more than one object 🤔

ridvancetin
Автор

Could you tell me why do you put token inside the inject function please?

uluqbhr
Автор

Great video. What extension was used to label your parameter name and arguments?

ugochukwuumerie
Автор

Hi, how can I typing posts:
posts: Signal<Post[]> = toSignal() throw error, I can add Signal<Post[] | udnefined> but it is good practice?

maciekkiller
Автор

I appriciate your videos but i am starting to doubt signals. Everything just looks like a mess and i dislike imperative code. The pinned comment makes it a lot cleaner but still though dont think im conviced signals are the future.

g-luu