Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

161
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!