I am trying to use localStorage and store multiple records on the users device. I am following this article http://learn.ionicframework.com/formulas/localstorage/ . In my code the key increases by one. (0, 1, 2,) How do I loop through the records in localStorage to show them in the view. This code seems not to work.
for (var j = 0; j < localStorage.length; j++ ) {
$scope.listClients = [
localStorage.getObject(j)
];
}
It will not print anything out. Anyone know how to fix this?