How can I use azure mobile service as a backend to my ionic3 app?

how can I use azure mobile service as a backend to my ionic3 app ?

@wwyy, you will have to have endpoints created in your Azure Mobile App backend that the app will call using “invokeApi()” method on the WindowsServiceClient.

You would put something like this in your service/provider:

import WindowsAzure from 'azure-mobile-apps-client'; //install this library 
.
.
.
@Injectable()
export class SomeService {
    mobileAppBackend: any;
    .
    .
    this.mobileAppBackend = new WindowsAzure.MobileServiceClient(<URL_TO_YOUR_AZRE_MOBILE_APP_BACKEND>);

    this.mobileAppBackend.invokeApi(url, { method: 'GET' });
}

You can add any object in second parameter.

This call returns a Promise so you will have to handle it as you would with any Promise.

However, be advised as per what I heard from Microsoft team Azure Mobile App service will be discontinued. So I would suggest you use Azure API App instead. You can still configure Notification Hub in API App. You won’t get Offline storage and couple of other things but if they discontinue Mobile App backend service you loose it anyway.

If you have a way get it confirmed before you spend time utilizing Azure Mobile App in your setup.

Hope this helps.