Trying to make strophe.js dance to the Ionic tune

I have managed to get it working by NOT using the npm installed version with DefinitelyTyped.

Steps to get it to work

  1. Copy strophe.js to the www dir (not the src dir)
  2. Include in index.html with
    <script src="strophe.js"></script>
  3. declare a dummy variable that matches the library
    declare var Strophe: any;
  4. use the dummy as per “normal”
    this.connection = new Strophe.Connection(this.BOSH_SERVICE);

This works, but is very un-TypeScript.
I still want to get it to work with DefinitelyTyped.

Any one with guidance here?

1 Like