I’m trying to implement cordova-plugin-ms-azure-mobile-apps in my ionic 3 app. I’m following Microsoft’s article which describes how to setup azure in an Ionic 2 app. Hopefully it works in Ionic 3. The article says add the plugin (ionic cordova plugin add cordova-plugin-ms-azure-mobile-apps) and to include the following code:
declare var WindowsAzure: any;
var client = new WindowsAzure.MobileServiceClient("https://yoursite.azurewebsites.net");
So I did the following but for my Ionic 3 app:
declare var WindowsAzure: any;
export class LoginHelper {
private client: object = new WindowsAzure.MobileServiceClient("https://alertme.azurewebsites.net");
constructor() { }
login() {
var connType = this.network.type;
this.client.loginWithOptions('google', { parameters: { access_type: 'offline' } })
.then(function (token) {
...
});
}
}
However, as anticipated, the client is not a WindowsAzure object and it doesn’t contain loginWithOptions. Where did I go wrong?
Thanks!