I am using [ngStorage][1] module of AngularJS. Below is my code:
[ngStorage][1]
$localStorage.$reset();
it is removing all variable.
Try this:
$localStorage.$reset({ counter: 42 });
where counter is the key of your localStorage.
counter