favourite
I'm following these two links:
https://getsatisfaction.com/apperyio/...
https://getsatisfaction.com/apperyio/...
I want to save favorites in localStorage so that only the device.
First I put in local set storage variable "myFavorist"
And then I create a Generic service:
Appery.prueba = Appery.createClass(null, {
Code: Select all
init: function(requestOptions) {
this.__requestOptions = $.extend({}, requestOptions);
},
process: function(settings) {
if (this.__requestOptions.echo) {
settings.success(this.__requestOptions.echo);
} else {
var myFavorits;
try {
myFavorits = JSON.parse(localStorage.getItem("myFavorits"));
if ({}.toString.call(myFavorits) !== "[object Array]") {
myFavorits = [];
}
} catch ( e ) {
myFavorits = [];
}
settings.success(myFavorits);
}
settings.complete('success');
} });
And then load ivoke service.
But I get:
This is my public link: