How to keep globally current user until logout with angular_devise?

前端 未结 5 781
挽巷
挽巷 2021-02-18 18:29

How to create own service accessible globally that will call server by currentUser() only once on page load, if User is logged in then keep it and provide data to c

5条回答
  •  既然无缘
    2021-02-18 19:17

    Save the user details in Global.user use 'Global' module in controllers or services.

    when you have to access the user then access using Global.user

提交回复
热议问题