Thank you so much for the kind words! And glad you found my channel! I'm considering doing a new RxJS/signals course for Pluralsight, but haven't committed yet.
Deborah, you've been a God send for my job and learning angular and reactive/declarative and bringing a new paradigm to where I work. Once again, I need to ask a question. How can we clear an observable? For example, I have a form that sends data using an action stream, returns the response object and displays the data in a table using async pipe. But I have a reset button, that resets the input fields, but I also want to use it to clear the observable so the table disappears and the data is cleared. Any thoughts? Ive tried setting the variable: response$ = of(); in my reset() method, but this doesn't allow us to make another call after that? The "response" variable in the actual ts file is: response$ = this.dataService.placeholder.pipe(....). In the reset method I'm trying to clear it. Whats the approach for this?
So glad my content has been helpful. Thank you. For a reset or refresh feature, you could do something like this: private refresh = new BehaviorSubject(undefined); // Action stream for loading private isLoadingSubject = new BehaviorSubject(false); isLoadingAction$ = this.isLoadingSubject.asObservable(); products$ = this.refresh .pipe( tap(() => this.isLoadingSubject.next(true)), mergeMap(() => this.http.get(this.productsUrl) .pipe( tap(data => console.log('Refreshed Products', JSON.stringify(data))), catchError(this.handleError) )), tap(() => this.isLoadingSubject.next(false)), shareReplay(1) ); In your case, instead of regetting the data, it would return of(). Would that work?
Btw, it seems like NGRX is not playing well with the new functional way of doing things. I failed miserably to inject the store in the resolver using store = inject(Store). Is there a way to make a video on that?
NgRx has recently made lots of changes to support many of the new Angular features ... including the addition of a "signal store". What version of NgRx are you using?
@@deborah_kurata the latest. To be honest, I tried that before I watched your videos on TH-cam. Still, I think it will be helpful to make such videos. Thanks
Wish I could ... but that is one area I have not yet dove into. Manfred is the true master. Try his video here: th-cam.com/video/CDKK6FVvqvs/w-d-xo.html Let me know if that was helpful.
Thank you Deborah, great.
🎉🎉Perfect explanation… thanks for sharing! 😍😍😍👌🏽🎉🎉
Glad it was helpful! Thank you for watching!
Many likes
Thank you!
Thanks you for the video, it help me so much to begin learn angular
Glad it was helpful!
You're awesome Deborah! ❤
That is so kind of you! 😊 Thank you!
Cool, as always!
Very nice, good video.
Thank you!
Thanks
You are welcome! Thank you for watching!
@@deborah_kurata you are awesome ♥️
What I missed in the video and in the code examples is any kind of unit tests. How do I unit test or trigger the transform function in unit tests?
great video 👌🏻
Thank you ☺
great, this feaure reminds me WPF value converters
Yes! Or Silverlight. LOL
Tnx!!!
Thank you for watching!
Wow! Deborah, you're a national treasury. I didn't know you are on TH-cam. Are you planning on recording a new course on Pluralsight?
Thank you so much for the kind words! And glad you found my channel!
I'm considering doing a new RxJS/signals course for Pluralsight, but haven't committed yet.
@@deborah_kurata looking forward to it.
She is a global treasury! :D
Using the booleanAttribute transform function will cause issues when we wanna create a same name directive right?
Could you elaborate on your question? Maybe with an example?
Hi Deborah
Please when a new Angular 16 path on Pluralsight will be published?
I believe that there are some new Angular 16 courses already in Pluralsight, including "Angular Fundamentals"
Deborah, you've been a God send for my job and learning angular and reactive/declarative and bringing a new paradigm to where I work. Once again, I need to ask a question. How can we clear an observable? For example, I have a form that sends data using an action stream, returns the response object and displays the data in a table using async pipe. But I have a reset button, that resets the input fields, but I also want to use it to clear the observable so the table disappears and the data is cleared. Any thoughts? Ive tried setting the variable: response$ = of(); in my reset() method, but this doesn't allow us to make another call after that? The "response" variable in the actual ts file is: response$ = this.dataService.placeholder.pipe(....).
In the reset method I'm trying to clear it. Whats the approach for this?
So glad my content has been helpful. Thank you.
For a reset or refresh feature, you could do something like this:
private refresh = new BehaviorSubject(undefined);
// Action stream for loading
private isLoadingSubject = new BehaviorSubject(false);
isLoadingAction$ = this.isLoadingSubject.asObservable();
products$ = this.refresh
.pipe(
tap(() => this.isLoadingSubject.next(true)),
mergeMap(() => this.http.get(this.productsUrl)
.pipe(
tap(data => console.log('Refreshed Products', JSON.stringify(data))),
catchError(this.handleError)
)),
tap(() => this.isLoadingSubject.next(false)),
shareReplay(1)
);
In your case, instead of regetting the data, it would return of().
Would that work?
Btw, it seems like NGRX is not playing well with the new functional way of doing things. I failed miserably to inject the store in the resolver using store = inject(Store). Is there a way to make a video on that?
NgRx has recently made lots of changes to support many of the new Angular features ... including the addition of a "signal store". What version of NgRx are you using?
@@deborah_kurata the latest. To be honest, I tried that before I watched your videos on TH-cam. Still, I think it will be helpful to make such videos. Thanks
Is it an alternative for getter and setter?
You can use it instead of a getter and setter if the purpose of your getter/setter is to perform data transformation. Yes!
Hi can you give us some input on Micro front end, thanks in advance
Wish I could ... but that is one area I have not yet dove into.
Manfred is the true master. Try his video here: th-cam.com/video/CDKK6FVvqvs/w-d-xo.html
Let me know if that was helpful.
'PromoSM' 😝
Thanks
You are welcome! Thank you for watching!