retain angular variables after page refresh

前端 未结 5 1196
一个人的身影
一个人的身影 2020-12-03 17:01

I\'m trying to figure out a way to keep my angular variables with page refresh / across controllers. My workflow is,

  • user logs in via facebook an
5条回答
  •  借酒劲吻你
    2020-12-03 17:43

    use `localStorage.setItem("key",value);` to set the value.
    use `localStorage.getItem("key");`to get the value.
    use `localStorage.clear();`to clear the value which is set
    

提交回复
热议问题