Govind Jha
Govind Jha

Reputation: 123

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.

Upvotes: 0

Views: 4190

Answers (1)

Ravi S. Singh
Ravi S. Singh

Reputation: 657

Try this:

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

where counter is the key of your localStorage.

Upvotes: 3

Related Questions