I am currently experimenting with LocalStorage in order to store an array containing objects. The issue I'm facing is that the code snippet below is displaying an object in the console instead of returning an array. Due to this, my ion-list is unable to read it. Is there a workaround for this situation, allowing me to retrieve the value as an array with all my objects included? Each object within the array holds various properties like ID, title, etc. My goal is to store multiple presentations in the array and then access and display them individually in the ion list.
Manager.js
playlistService.addPlaylistAll = function (presentation) {
console.log("setting item");
var playlistarraytest = [];
playlistarraytest.push(presentation);
console.log("array first!! ", playlistarraytest);
localStorage.setItem('playlisttest', playlistarraytest);
playlistService.refresh();
var test = localStorage.getItem('playlisttest');
console.log(test);
}
Playlist.html
<ion-list ng-repeat="presentation in dayOne = (playlist | filter: { day: 1 } | orderBy: 'start_date')">