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

70
Views
Want to set the values to form component of template driven form in angular?

I have a 2 components add-items and view-items. view-items is my parent component and add-item is my child component.

In view-items component i have table and its data. There is a Edit button in my each row. So, when user clicks on edit button. i am sending that row values to add-items component. but, i am unable to set those values in form and unable to update in table with specified row. can anyone help me here?

Thanks in advance!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You have to implement ngOnChanges and copy all properties to StudentFormData.

export class AddItemsComponent implements OnInit, OnChanges{

  :
  
  ngOnChanges(changes: SimpleChanges): void {
    this.StudentFormData.name = this.item.name;
    this.StudentFormData.division = this.item.division;
    this.StudentFormData.gender = this.item.gender;
  }

}
about 4 years ago · Juan Pablo Isaza 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!