Hey guys! Check out the follow up video to this tutorial on the link below. I cover some improvements especially related to making multiple calls and their issues with the spinner kzbin.info/www/bejne/imnXd4ZsqZili9k
@TheFilburt882 жыл бұрын
This is one of the best tutorials I've seen so far, you explained it very well. Thank you so Much!
@ZoaibKhan2 жыл бұрын
You're very welcome, Franco! Glad it has helped in some way :)
@karthiksadanand55783 жыл бұрын
This is one of the cleanest tutorials !, thank you
@ZoaibKhan3 жыл бұрын
Thanks Karthik, glad you liked it!
@emmanuellatrustenomah532 Жыл бұрын
This was very helpful!
@ZoaibKhan Жыл бұрын
Glad you liked it! 👍
@codeaz5673Ай бұрын
thank u Sir. Can u make a video for upgrading this project angular v 19 please
@MariaBadanina9 ай бұрын
Thank you very much! This video helped me
@ZoaibKhan9 ай бұрын
Glad you liked it!
@kiendinhkhoi3 жыл бұрын
How to show spinner and blur background bro?
@plumemotorpartpmp16252 жыл бұрын
thank you teacher very good lesson : )
@ZoaibKhan2 жыл бұрын
You're welcome :)
@alexou8572 жыл бұрын
Thank you my man, you are the best :)
@ZoaibKhan2 жыл бұрын
You're welcome. Glad you liked it :)
@raviteja87982 жыл бұрын
Hello sir, I have one doubt regarding this. please help me sir, please reply
@ZoaibKhan2 жыл бұрын
What kind of doubt, jhon?
@ZoaibKhan2 жыл бұрын
@@raviteja8798 here's the follow up video to this tutorial which covers and fixes this issue. Hope it helps! :) kzbin.info/www/bejne/imnXd4ZsqZili9k
@ZoaibKhan2 жыл бұрын
@@raviteja8798 ok, let me go through your problem in detail and see what the issue might be
@ZoaibKhan2 жыл бұрын
@@raviteja8798 Hey! So after going your message in detail, it seems your problem is with the long-running API call on Component A. Ideally, you should add a way for the API call to be cancelled once the user navigates away from the component - because it's no longer needed. Here's a link for a possible solution: www.freakyjolly.com/angular-how-to-cancel-http-calls-on-router-change/ If you do need the data from the API call - then maybe you should use a global service with another behavior subject and load it there and add an exception in the interceptor - where the spinner doesn't show for this specific call. I'd suggest though to review this 1 minute long API call - because it would be pretty bad for user experience, besides creating this spinner problem... Hope this helps.
@vuduyanh77913 жыл бұрын
thank you so much , if settimeout for loading Spinner , what i do , please support
@ZoaibKhan3 жыл бұрын
You're welcome, Vu! Can you describe in more detail, why do you want the settimeout for the loading spinner?
@vuduyanh77913 жыл бұрын
@@ZoaibKhan tks your , i do it success , However , I'm getting an error NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'false'. Current value: 'true'.. your can help me .
@ZoaibKhan3 жыл бұрын
Yes, this just appears in development and does not really affect the functionality much. But still, you can make a small change in the service on this line: loading$ = this._loading.asObservable().pipe(delay(1)); This is similar to setTimeout - using the RxJS delay operator instead because it looked cleaner to me. This should clear the error in development.
@vuduyanh77913 жыл бұрын
@@ZoaibKhan thanks your so much
@ZoaibKhan3 жыл бұрын
@@vuduyanh7791 you're welcome :)
@gradientO3 жыл бұрын
Good tutorial
@ZoaibKhan3 жыл бұрын
Thanks!
@amalrajp833 жыл бұрын
Hi Useful video👍. One qn , Will this work properly if multiple calls are done at same time?
@ZoaibKhan3 жыл бұрын
Hey Amal! Good question :) The answer is no. To allow multiple calls at same time, we'll need to increment and decrement a counter on start and end of API calls in the interceptor. Then, only hide the spinner when counter is 0 i.e. no calls are in process. Hope that helps
@amalrajp833 жыл бұрын
@@ZoaibKhan Thanks for the repy
@giorgimerabishvili81943 жыл бұрын
Thank you!
@ZoaibKhan3 жыл бұрын
Welcome, Giorgi!
@tranquillityEnthusiast3 жыл бұрын
Need more vedios..
@JamesMooreDev3 жыл бұрын
I get the following error message. NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'false'. Current value: 'true'.. This is something to do with the loading$ variable in my app.component.html. Just wondering if anyone knows a fix for this.
@ZoaibKhan3 жыл бұрын
Hey James! It is a development time error only and the quickest fix for it will be to add a small delay so that the the loading value is updated in the next change detection cycle. If you look at the latest code (link in description), I've already fixed that there. Hope that helps!
@ogunkayodeoluwaseun9348 Жыл бұрын
@@ZoaibKhan how does one add this delay??? cause I'm facing the same error
@ZoaibKhan Жыл бұрын
@@ogunkayodeoluwaseun9348 Check out the code in the description!
@AGGPEE2 жыл бұрын
Oh me vengoooo
@rohitsoni24393 жыл бұрын
Those who are facing error expression changed please add this : public readonly loading$ = this._loading.asObservable().pipe(delay(1));