How to remove localstorage value in angularjs

4.1k Views Asked by At

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

$localStorage.$reset();

it is removing all variable.

1

There are 1 best solutions below

1
On BEST ANSWER

Try this:

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

where counter is the key of your localStorage.