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

163
Visualizações
How to display data from an API into a clickable/highlightable list of buttons Angular

Right now I have a successful API call that shows in the console fine, but I'm not sure now how to display this data in a way like in this picture

Example

At the moment I'm using an array in TS to do so like this:

values = ["Wellbeing","Motivation", "Fitness","Assertiveness", "Productivity",
  "Resilience", "Teamwork","Emotional intelligence","Nutrition","Positivity/Perspective",
  "Communication (verbal)", "Navigating work","Communication (written)","Confidence","Work/Life",]

And called in the HTML:

<div *ngFor="let value of values">
    <button
    #btn
    class= "selection_btn text-center"
    (click)="btn.classList.toggle('selected')"
    (click)="control.setValue(control.value.concat([value])) "
  >{{value}}</button>
    </div>

And these display fine with some CSS styling needed(thats for another question) but how do I replace those values with the API names? The API is set up in JSON like so:

[{"id":16,"categoryId":2,"name":"Culture"},]
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