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

162
Vistas
How do I display a button only when a row is selected in Angular

I have added an extra column to a table for a button to export a row from my table. I’m trying to make it so that button is only displayed for the selected row. (When you haven’t selected any rows there is no button to export the row but when you have selected a row there is a button to export the selected row but only on the row you have selected). I’ve been trying to use ngif but am new to angular so haven’t been able to figure out a solution.

** HTML CODE: **

<button type=“button” class=“btn” (click)=export()>Export</button>
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Try the below code:

HTML:

<button *ngIf="selected" type=“button” class=“btn” (click)=export()>Export</button>

TS:

Selected:Boolean=false;

selecteddrow(){
//some condition to for selecting the row.
this.selected=true;

}

over 4 years ago · Santiago Trujillo 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