0

I want to get contact details using amazon connect streams, I am not aware how to use it in angular5. I searched throughly and I get the below js code. how to use it in angular5.

  connect.core.initCCP(containerDiv, {
     ccpUrl:        ccpUrl,        /*REQUIRED*/
     loginPopup:    true,          /*optional, default TRUE*/
     softphone:     {              /*optional*/
        disableRingtone:  true,    /*optional*/
        ringtoneUrl: ringtoneUrl   /*optional*/
     }
  });
Bhaskararao Gummidi
  • 1,605
  • 3
  • 12
  • 14

1 Answers1

3

You can refer to this solution: Angular2: import external js file into component

Just to summarize this: 1. Add the .js file into assets folder of Angular.

  1. Declare js file as script source tag in index.html

  2. Then add "declare var connect: any;" in the component .ts file:

You should be able to call the functions in js file from the component typescript

Hope this helps!

kskiran
  • 106
  • 7