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

270
Views
Edit a row of Table in Angular 2

How can I make a row editable by clicking a button edit. I tried put contenteditable="{{stat}}" and putting this code in component.ts but it didn't work

<tr *ngFor="let coll of colls">
        <td><i title="Editer le Collaborateur" (click)="EditColl()" class="ion-edit ion-white"></i>
        <i title="Supprimer le Collaborateur" (click)="DeleteColl(coll)" class="ion-trash-a"></i></td>
     <td contenteditable="true">{{coll.cin}}</td>
     <td>{{coll.lastname | uppercase}}</td>
     <td>{{coll.firstname}}</td>
     <td><a class="email" href="mailto:${{coll.email}}">{{coll.email | lowercase}}</a></td>
     <td>{{coll.datenaissance}}</td>
     <td>{{coll.dateembauche}}</td>
    </tr>

component.ts

statut:string='false';
EditColl(){
 if(this.statut==='true')
 {
   this.statut='false'
 }
 else
 this.statut='true'
}
over 4 years ago · Santiago Trujillo
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!