Este es el código que me gustaría usar en mi componente Angular:
<form action="https://www.meu-site.com/processar-pagamento" method="POST"> <script src="https://www.mercadopago.com.br/integrations/v1/web-tokenize-checkout.js" data-public-key="ENV_PUBLIC_KEY" data-transaction-amount="100.00"></script></form>Si tiene que cargar el script desde un sitio remoto, puede agregarlo a su archivo index.html, como lo haría en un sitio html normal.
índice.html
<!-- get script from 3rd party site --> <script src="https://www.mercadopago.com.br/integrations/v1/web-tokenize-checkout.js" data-public-key="ENV_PUBLIC_KEY" data-transaction-amount="100.00"> </script>Luego, para usar el script en su componente, debe declarar manualmente las variables/funciones exportadas para evitar errores de compilación de TS
** formComponent.ts**
declare let web-tokenize-checkout: any; //declare the name of the global object you got from the script you added //use your script functionality, That part is really depends on how the script you imported works web-tokenize-checkout.doWhatEverYouNeed(....);