I'm beginner in development Cordova AngularJS. I use $localStorage
to persist data. I use like this:
$http.get('http://127.0.0.1:8080/elodieService/evenements/' + $localStorage.idcategorie, {
params: {
fields: "titre_annonce,texte_annonce,adresse,imageJson",
format: "json"
}
}).then(function(result) {
$localStorage.listEventParCategorie = result.data;
});
It's good, it works but now i want to check this condition
if ($localStorage.'listEventParCategorie' + idcategorie == null) {
}
e.g.: I concatenated listEventParCategorie
with idcategorie
to have $localStorage
dynamic but is not worked. Please help me.