I am using angularJS localstorage and i injected this very well but problem in code.
I want when localstorage gets new data, so that its call a function $scope.get
$scope.get
Use the storage event:
angular.element(window).on("storage", $scope.getAllContact); $scope.$on("$destroy", function() { angular.element(window).off("storage", $scope.getAllContact); });
For information, see