Reputation: 22416
In Angular I tried:
$localStorage.clear();
It got the error:
$localStorage.clear is not a function
What is the correct calling convention to wipe out $localStorage
?
Upvotes: 2
Views: 4572
Reputation: 1323
If you are using ngStorage you can try $localStorage.$reset(); instead clear().
This method clear is the default HTML5 method, to use it you have to take off $, eg: localStorage.clear()
Upvotes: 5