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

410
Visualizações
Angular/JavaScript: Can log out the array, but cant log out a single element

I spent two hours on i think should be a simple solution thus the html badness. How would i be able to display my tags? The html badness

The api call i make

The interfaces i put my data into(everything work except the arrays) The function that calls the api and gets the data that my html needs

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

0

According to your PhotoDetails interface, tags is of type Tag, not Tags. This means that detail.tags will return you a single Tag. If you want that to be an array your interface should be changed like so:

export interface PhotoDetails {
  ...
  tags: Tag[];
  ...
}

The Tags interface is most likely redundant, and you can get rid of it. When you want an array of Tag, just declare the type as Tag[].

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