Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71530

Need help implementing Azure in Ionic 3

$
0
0

@mlibby wrote:

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? Please help me implement Azure in an Ionic 3 app.

Thanks!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71530

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>