CanDeactivate Route Guard - Angular (Tutorial #26)

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024
  • CanDeactivate Route Guard in Angular - Tutorial no. 26
    The Angular CanDeactivate guard is called, whenever we navigate away from the route before the current component gets deactivated.
    The best use case for CanDeactivate guard is the data entry component.
    The user may have filled the data entry and tries to leave that component without saving his work.
    The CanDeactivate guard gives us a chance to warn the user that he has not saved his work and give him a chance to cancel the navigation
    Use this link to share this video : • CanDeactivate Route Gu...
    You can also visit my following videos:
    CanActivateRouteGuard: • CanActivate Route Guar...
    CanActivateChild Route Guard: • CanActivateChild Route...
    Nested Routing: • Nested Routes - Angula...
    Router Parameters: • Route Parameters - Ang...
    Routing: • Routing - Angular (Tut...
    Angular Tutorial Series:
    • Introduction- Angular ...
    Follow me on:
    ►RUclips : / nishasingla
    ►Facebook : / angularjs4beginners
    ►LinkedIn : / nishasingla

Комментарии • 52

  • @NishaSingla
    @NishaSingla  4 года назад +4

    If you have missed my previous video on CanActivateChild Route guard. Take a look
    ruclips.net/video/Z0PNK-n5iv0/видео.html

  • @utkarshgautam1940
    @utkarshgautam1940 Месяц назад

    vedio is very nice ,crisp,clear,to the point ,love u mam

  • @vanikumari9797
    @vanikumari9797 Месяц назад

    the way u r explaining is awesome...thanks a lot😍

  • @gururaj1842
    @gururaj1842 2 года назад +1

    you are great at teaching....ur content is good...its just that you are teaching as if you are teaching to a class....just speak as if you are teaching to a friend....makes us listen for a long time....thanks again for the content nisha.

  • @vikaspooner9846
    @vikaspooner9846 Год назад +1

    Appreciate the way you teach in correct and concise manner. Can you also cover ngrx(state management) and rxjs in angular since there are very limited resources regarding these topics on youtube.

  • @saquibiqbal2350
    @saquibiqbal2350 2 года назад

    Great explanation. I am working with angular since last 3 years but never see this kind of short and crisp explanation video. Thanks for it.

  • @aayush5474
    @aayush5474 3 года назад +2

    Thank you i was looking at a tutorial and they didn't explain why interface was required thank you for explaning this

    • @NishaSingla
      @NishaSingla  3 года назад +1

      Glad to know it helped 😀👍🏻

  • @joshuakappala3792
    @joshuakappala3792 4 года назад +1

    great Nisha clean explanation your videos are way better than plural sight videos charging several bucks .keep doing more videos thanks in advance.

  • @dawoodsherazi7966
    @dawoodsherazi7966 2 года назад

    thanks for this great explanation my every single question is answered in your video......you are great explaner!

  • @konadeepak9443
    @konadeepak9443 4 года назад +1

    Thank you for uploading new content on Routes. I gone through all your previous videos on Angular.

  • @balajinaikmudavatu7855
    @balajinaikmudavatu7855 4 года назад +2

    Thank for the wonderful lecturers Angular.I have been recommending your channel for Angular videos to my colleague's.

    • @NishaSingla
      @NishaSingla  4 года назад

      Thank you . Glad to know you liked it . Keep learning and sharing

  • @ramanrrr
    @ramanrrr Год назад

    Unbelievable yar...very interesting to watch your videos, like way of your teaching and explanation. Thanks a lot 🙌

  • @jagdishrohit3748
    @jagdishrohit3748 4 года назад

    Thank you very much for providing this. I request to you please provide more videos for CRUD operations.

  • @ManojPal-gx6he
    @ManojPal-gx6he Год назад

    content is very good

  • @shrikhan2215
    @shrikhan2215 Год назад

    THANK YOU !

  • @nsumankrishna
    @nsumankrishna 3 года назад +1

    Thanks for the awesome learning experience

  • @baileybaltaragis4201
    @baileybaltaragis4201 3 года назад +1

    Thanks for the video! It was very useful

  • @idlevandal69
    @idlevandal69 4 года назад +1

    Excellent.. 🥇

  • @vikaspooner9846
    @vikaspooner9846 3 года назад +1

    Truly amazing.. Good content.

  • @user-fp7wg3sm1f
    @user-fp7wg3sm1f 4 года назад

    Very good ,especially the generic solution ! thank u

  • @abhinay20
    @abhinay20 4 года назад

    Tq for great explanation please make videos on
    Best practices of angular
    Angular Form validations
    Dependency Injection
    Components hooks with best practices

  • @AnkitSingh9787
    @AnkitSingh9787 3 года назад +1

    awesome

  • @IqbalAhmed-qk5ix
    @IqbalAhmed-qk5ix 3 года назад

    Awesome
    Thank u so much

  • @lokeshnallapureddy7208
    @lokeshnallapureddy7208 4 года назад +1

    Video is osm ma'am make a video on locale and internationalisation

  • @sonalipawde9839
    @sonalipawde9839 4 года назад +2

    How to create custom dialog using can deactivate guard?

  • @aussieraver7182
    @aussieraver7182 3 года назад

    if(component.canLeave)
    .'canLeave' is undefined, even though it is declared in my component as it implements the interface we exported in the UnsavedChangesGuard.
    I'm not sure what i'm doing wrong.
    EDIT:
    It was because the returned 'component' from the 'canLeave()' method was returning the parent component instead of the child component.

  • @pardhasaradhi0076
    @pardhasaradhi0076 3 года назад +1

    Iam pardha as new to angular. Could you please suggest best architecture for consuming services

  • @trustingod0
    @trustingod0 2 года назад

    Can i notify user if they close browser or type in the route? Im confused about using interfaces to make guards reusable. Thanks

  • @nandagiriramyasree6804
    @nandagiriramyasree6804 2 месяца назад

    Can u plz again explain canActivateChild once again clearly plz

  • @tacklewithtricksbykajala.4231
    @tacklewithtricksbykajala.4231 3 года назад

    Just wanna ask for whole form how we can target to check whether it got dirty ?

  • @rowdyghatkar
    @rowdyghatkar 3 года назад

    How can we use this for a complete form.

  • @saikumarmogilla450
    @saikumarmogilla450 3 года назад +1

    Hi Nisha, by default the boolean is false???

  • @ArvindGupta-ck4zn
    @ArvindGupta-ck4zn 4 года назад

    If we have 20 fields then have we required to check for all the fields or common things?

  • @vedhalokanadham9254
    @vedhalokanadham9254 3 года назад

    can you please make some videos on forms

  • @thirumanitheivarajan7295
    @thirumanitheivarajan7295 3 года назад

    How to detect page load/ page refresh when unsaved form?

  • @kothuriharish6544
    @kothuriharish6544 3 года назад

    Could you please let me know, How stop not to logout the application when model is dirty.

  • @mithileshpandey9885
    @mithileshpandey9885 3 года назад

    i need full angular 11 material

  • @yaswanthakula3133
    @yaswanthakula3133 3 года назад

    canDeactivate has called twice in my case, can you please explain why?

  • @tacklewithtricksbykajala.4231
    @tacklewithtricksbykajala.4231 3 года назад

    Mama apne sirf username dirty hai kya wo check kiya agr pure page ki koi form field chech krni ho dirty hai kya to kaise kre

  • @user-fp7wg3sm1f
    @user-fp7wg3sm1f 4 года назад

    May be you can upload source code to github ?