Backendless & Ionic 2

Has anyone had any luck integrating Backendless MBAAS with Ionic 2? I can’t seem to get the dependancy injection in the right place.

The Backendless.js file is in the same directory as my app.js file which I then import with “import ‘Backendless’” but for some reason the IDE (Visual Studio Code) doesn’t recognise Backendless as a usable object? (Not sure if object is the correct term). Also the code doesn’t seem to run.

When I debug, it is included as part of the js that loads in the browser but doesn’t all it to run in HomePage.js for example.

Hope that all makes sense. If someone just has a working example or can just help me with where to put the code for initialisation and authentication for example then that would be great.

Hey there! Came across your SO post here:

Seems like your got the right idea in the answer.

You might want to even go as far as doing

import * as backend from 'backendless';

where backend is your alias, and 'backendless' is your package name.