Azure-Mobile-Basic 是 NativeScript 模块,通过 Azure Mobile Services 提供基础表单数据 GET 功能。
创建:
// viewmodel.js var client = new azuremobile.MobileServiceClient( "https://<Your Mobile Service URL>", "<Your mobile service application key>" );
调用:
var itemArr = []; client.getTableItems('<tableName>', '<dataColumnName>', itemArr) .then(function(){ for (var i = 0; i < itemArr.length; ++i) { tasks.push(itemArr[i]); } });