I am passing my data in this way
$cookies.putObject("currentLocation,values,allLocList", obj, vm.tempData, vm.allLocationList);
The objects obj
and vm.tempData
are being sent as objects, while vm.allLocationList
is an array that contains a JSON object.
When retrieving the data in my state file:
resolve: {
entity: function($cookies) {
return {
location: $cookies.getObject("currentLocation"),
values: $cookies.getObject("values"),
allLocationList: $cookies.getObject("allLocList")
};
}
}
Upon reaching the controller, entity.location
and entity.values
display correctly, but entity.allLocList
appears to be undefined. Any suggestions on how to fix this?