platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
StatusBar.styleDefault();
console.log('test');
client = new WindowsAzure.MobileServiceClient('https://build2016-vsmobile.azurewebsites.net/');
});
If I manually refrence the script (MobileServices.Cordova.js) from the cordova plugin in my index.html file, it works… but this is bad practice to say the very lest.
Hi Richard, sorry for the super late reply… take a look at the github issue page of Azure mobile cordova plugin. I haven’t tried any further with Azure due to other projects, but they gave me some direction (I have to try out yet). What worked straight out of teh box for me was to take the script, that they are using inside their cordova plugin and reference it in the index.html. I guess they simply wrapped their normal library inside a cordova plugin, not sure though.
Reading through your post I manage to get my new ionic2 app work with Azure table APIs and currently struggling with setting up offline sync with local storage. Any chance you having another post or working example?
I thought about it, that is, to install it locally in my app so that I can refer it in import statements in my .ts files but being new to Ionic 2 framework and TypeScript, I wasn’t sure.
Your article and link to that “Using Third Party Libraries” on Ionic’s website helped and confirmed my understanding.
One thing that is mentioned by you and also in the Ionic’s link but I did not do is creating the “.d.ts” file and adding an entry for the library. I didn’t have to do that. I tried to import WindowsAzure in my .ts file from cordova-plugin-ms-azure-mobile-apps and it was able give me that as InteliSense option (which means it recognized the library without doing the “.d.ts” file part.