0

I'm coding against the openFin fin object but the NG compiler doesn't recognise it. Do I need to import something ? I have @types\openfin in my node_modules.

What else do I need do to use the library ?

Tried importing but can find no examples of what to import

createWindow() {
    const winOption = {
        name:'child',
        defaultWidth: 300,
        defaultHeight: 300,
        url: 'http://localhost:4202/',
        frame: true,
        autoShow: true
    };
    return  fin.desktop.Window.create(winOption);
}

I expect fin to open the running website on 4202 but the output is:

"Cannot read property 'desktop' of undefined"

Shwabster
  • 482
  • 1
  • 12
  • 26
AndyK
  • 41
  • 1
  • Have tried this BTW & no luck: https://stackoverflow.com/questions/52150455/how-to-integrate-angular-2-app-to-openfin-platform – AndyK Jun 14 '19 at 14:22

1 Answers1

1

Yes, install openfin in your angular application with following command:

npm install --save @types\openfin

Once it installed then add following in compilerOptions block in your tsconfig.json

"types":["openfin"]

Now, It will start working..

sacgro
  • 439
  • 2
  • 4