Referencing outside script


#1

Hi All,

I don’t know how to reference the vars & functions of an external script.

In www/index.html, I’ve added

<script src="https://sdk.accountkit.com/en_US/sdk.js"></script>`

But I haven’t found the Ionic Framework documentation on how to access the functions and variables of the script when I’m in app/pages//.ts

Some specifics… I’m trying to integrate Facebook’s Account Kit. I wrote a working version as a stand-alone HTML file & NodeJS server, so I know the basic code works. As a quick test, I used an iframe to add it into an Ionic 2 project. But when I’m in my starter app, home.ts doesn’t have access to the script’s objects.

Do you have to import {XYZ} from 'unknown/path'; ?

Thanks,
Ryan