angularjs and localStorage change event

前端 未结 4 1808
梦如初夏
梦如初夏 2020-12-09 03:14

I store some data in the localStorage

what I want in my angularjs app is that when the data in the localStorage changed, the app rerender the app, how can I do this?

4条回答
  •  旧巷少年郎
    2020-12-09 03:27

    I recently created a module allows you to simply bind a localStorage key to a $scope variable and also store Objects, Arrays, Booleans and more directly inside the localStorage.

    Github localStorage Module

提交回复
热议问题