Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

71
Visualizações
Define script in index.html as object in angular component

I have a script set on index.html page like this:

<head>
   <script src="https://sandbox.web.squarecdn.com/v1/square.js"></script>
<head>

I'm trying to define it as an object and use it's functions in an angular component like this:

myFunction() {
   Square.<square function>()
}

I've seen a few different ways of loading scripts in components but I haven't seen anything on how to actually use the contents of the script. I'm not sure where on the DOM I'm supposed to be looking to define an object with, if that's how you're supposed to go about this.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda