angularjsng-storage

How to remove localstorage value in angularjs


I am using [ngStorage][1] module of AngularJS. Below is my code:

$localStorage.$reset();

it is removing all variable.


Solution

  • Try this:

    $localStorage.$reset({
        counter: 42
    });
    

    where counter is the key of your localStorage.