27. Save the User token data from Login in Ngrx State in Angular Ngrx Application

Поделиться
HTML-код
  • Опубликовано: 4 окт 2024
  • Hi Friends
    In this video, we will see how to save the user token data in the ngrx store state management in Angular Application.
    The code is deployed in my Github account.
    github.com/lee...
    If you like my video, please subscribe to my channel.
    RUclips Page: / leelawebdev
    Twitter Page: / leelanarsimha
    Linkedin: / leela-narasimha-reddy-...
    GitHub: github.com/lee...
    #Angular #ngrx #leelawebdev

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

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

    Thank you Leela for this very good content and explanation, This whole series is absolutely wonderful

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

    Hi leela, am designing a architecture to load the the data of 1000reords while login itself..what I want to achieve is to allow the user to do all work on background we need to fill the store, but what happens is , page is waiting till store is filled then it redirects can you help

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

    Thanks for the video. I have a basic typescript question, hopefully I can get the answer. For the code const user = new User(data.email, ....). If we return new User(data.email...) directly without defining user variable. Does it save some memory?

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

      When you assign it to variable memory location will be alocated

    • @gauravbaviskar4778
      @gauravbaviskar4778 4 месяца назад

      definitely, it will save memory but it is going to be very very small, so there won't be any impact on performance

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

    hi Leela, first of all thank you for your video, I like it a lot! :). But still i'm not quiet sure about updating the state simply by setting state.user to action.user ( in this video 8:00, line 10), could that be against immutability? Because both the state and the action are referencing the same user which is a complex object... However i couldn't find any issues or bugs with that so far, so maybe it does not really matter?

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

      We are using object destructing. The state user and action user are not same. Behind it will not send the same object

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

    hi can i know what is the benefit of storing the user token data in state instead of local storage?

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

      Yeah we can get the user data always from the local storage. But the course is intended of state management i did the concept of retrieving everything from the ngrx state

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

    Hii Team ,
    can any one help me , when Im creating the action I'm getting below issue .
    export declare function createAction(type: T, config: ActionCreatorProps & NotAllowedCheck): ActionCreator P & TypedAction>;

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    An argument for 'props' was not provided.
    my action file data :
    import { createAction , props} from '@ngrx/store';
    import { ProductResponseData} from '../response/product.response';
    import { ProductModel} from '../model/product.model';
    //import { Products } from "./metrics";
    export const productActionSuccess=createAction('[product page] success',
    props()
    );

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

    Hi Leela, what happens if I register one action into effects and reducer both?

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

      Nothing happens. when ever that action is called it will execute both reducer and effects

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

    Hi, how can I add other user information to firestore? Thanks

  • @gauravsingh-qt2zo
    @gauravsingh-qt2zo 3 года назад

    I am not getting the API key from the website firebase

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

      you will be able to find in the project settings

  • @kfl-appsheet6167
    @kfl-appsheet6167 2 года назад

    And i request for Pagination and Filters Videos using State

    • @LeelaWebDev
      @LeelaWebDev  2 года назад +2

      Sure bro will do. Need to complete the angular unit testing and e2e testing as fast as possible and will do. We will have the complete angular A to z with testing included. This will be great right.

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

      @@LeelaWebDev can I get the link to the unit testing

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

    done - 29 march

  • @AbhishekKumar-vl3cb
    @AbhishekKumar-vl3cb 3 года назад

    getting cors error

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

      cors error occurs because of cross domain. Check the domains you are calling

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

    Can you please explain how to add test@test.com as email & 123456 as password. I am not getting success status after login.
    Thank You!

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

      May be i think you didnt registered. Just check what is the error you are getting

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

      @@LeelaWebDev Thank You for the reply sir. I found the mistake and solved it.

    • @rahulbishwas9962
      @rahulbishwas9962 8 месяцев назад

      @@milanmishra6449 can you pls give the solution, I am also looking for it