Hello Tony,
Please try to use following JS code to create global service(this code you need to add to your new JS asset):
prevar onLoad = function(){
console.log("onloaded");
//Where "ToDoDB_dogs_list_service" is your service.
//and "yourGlobalServiceDataSourceName" will be your global service datasource.
window.yourGlobalServiceDataSourceName = new Apperyio.DataSource(ToDoDB_dogs_list_service, {
"onBeforeSend": function(jqXHR) {
},
"onComplete": function(jqXHR, textStatus) {
},
"onSuccess": function(data) {
},
"onError": function(jqXHR, textStatus, errorThrown) {}
});
};
jQuery(window).load(onLoad);/pre
Then you can invoke your global service with following JS code:
preyourGlobalServiceDataSourceName.execute();/pre