nativescript-azure-mobile-basic
A NativeScript module to read Azure Mobile Services backend table data
npm i --save nativescript-azure-mobile-basic
- Version: 0.1.2
- GitHub:
- NPM: https://www.npmjs.com/package/nativescript-azure-mobile-basic
- Downloads:
- Last Day: 0
- Last Week: 0
- Last Month: 0
NativeScript Azure Mobile Services Basic
NativeScript module for basic table data GET via Azure Mobile Services as a backend. Use require()
to include the module.
This is a super basic fetch using a URL, key, and table name to demonstrate the concept. A more in-depth Azure Mobile Services module is coming.
Usage
- set up an Azure Mobile Service, get the URL and Application key.
- create the MobileServiceClient
// viewmodel.js
var client = new azuremobile.MobileServiceClient(
"https://<Your Mobile Service URL>",
"<Your mobile service application key>"
);
- call getTableItems on the client, passing in the table name and the data column name
var itemArr = [];
client.getTableItems('<tableName>', '<dataColumnName>', itemArr)
.then(function(){
for (var i = 0; i < itemArr.length; ++i) {
tasks.push(itemArr[i]);
}
});