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

227
Visualizações
How to pass a file through different components in angular

I'm required to handle a photo upload in this I'm survey app building, the problem is, the post request is sent in the next screen.

So I need a way to pass the file through the screens since I can't store it in local storage.

My upload component

Needs to be passed this next screen ==>

Last screen of the flow

So when I post the survey, I can store the data in the database and after that, upload the image and relate it to the survey.

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Here is how you can do it:

  1. Create a service that both components would use.
  2. Create a property in that service that would store the files.
  3. Update that property from the first component with actual files.
  4. Fetch the files from the service in second component.
about 4 years ago · Juan Pablo Isaza Relatório

0

I did not really understand where you are building the function. But you can build the function in the service and pass it a parameter This is how you can call it in any component

about 4 years ago · Juan Pablo Isaza Relatório
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