Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

411
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda