Skip to content
Advertisement

Edit table row inline on click of edit in Angular

I have a table where data is populating. Each row has an edit link. I want to edit only a particular row on click of edit link. Right now its’ showing edit option for all the rows.

Also I want to show the text in a input box on click of edit.

Here is my code.

JavaScript

My current output looks like this

enter image description here

enter image description here

Advertisement

Answer

Here is the solution

html

JavaScript

ts file

JavaScript

Working Demo

Let me know if you have any doubt.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement