Angular - How to preserve data on page refresh

Sdílet
Vložit
  • čas přidán 14. 10. 2024

Komentáře • 15

  • @morogoyo
    @morogoyo Před 8 měsíci +1

    thank you, even 2 years later your video is still helping people

  • @fmax32
    @fmax32 Před rokem

    Дуже дякую! підписався щоб дивитись нові відео.

  • @muhidcs
    @muhidcs Před 2 lety +1

    Amazing tutorial! Thanks!

  • @miguelCarrascoQ
    @miguelCarrascoQ Před 2 lety +1

    good info. Thanks!

  • @triptop3703
    @triptop3703 Před 2 lety +1

    Is it possible to save data in the text field after refreshing but before submitting?

    • @nicolerutkowski4984
      @nicolerutkowski4984 Před 2 lety

      Yes. You'd need to run a function that will take the input value after every key press (consider debounce) and save it to local storage.

  • @Lala-yw7td
    @Lala-yw7td Před rokem

    Can I use resolver instead of local storage? Thanks.

  • @ragucool9468
    @ragucool9468 Před 2 lety +1

    How to make reusable component in angular ? Kindly make video bro.... thanks advance . Videos simply super

    • @saq.ib01
      @saq.ib01 Před 2 lety

      ng generate yourcomponentname

  • @webworksafrica4909
    @webworksafrica4909 Před 2 lety

    unrelated but i need help, how can i keep active tab after page refresh in Angular? i'm using mat-tab-group, mat-tabs

  • @mohamedelbadawy2764
    @mohamedelbadawy2764 Před 2 lety

    can i use it for solving logging out problem on refreshing the page ?!
    and how?

    • @nicolerutkowski4984
      @nicolerutkowski4984 Před 2 lety

      You would need to store the user's accessToken (or whatever you're using to validate the users session) in sessionStorage, then where you check if the user is logged in, you'd check if there's an accessToken in the sessionStorage before presenting the user with the login screen again.