1

I have a external js file named "https://ap-gateway.mastercard.com/checkout/version/46/checkout.js" and I want to call functions using that file. How can I import that external js file in Angular4? I mentioned it in my angular-cli.json file as follows.

"scripts": [
       "https://ap-gateway.mastercard.com/checkout/version/46/checkout.js"
   ],

And I also import it in my app.component.html file as follows. But it doesn't work.

<script src="https://testcbc.mtf.gateway.mastercard.com/checkout/version/35/checkout.js></script>
3
  • refer this it will help, stackoverflow.com/questions/44945766/… Commented Apr 22, 2018 at 5:51
  • "it doesn't work" isn't helpful Commented Apr 22, 2018 at 5:52
  • Try adding script tag in index.html Commented Apr 22, 2018 at 5:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.