I have a table filled with JSON data using ng-repeat, similar to the example shown here:
https://i.sstatic.net/Ffjuy.png
Now, I am looking to insert new rows at the top of the table by clicking a button. However, these additional rows should contain editable cells where there are currently blank rows. I do not want the existing rows to be editable.
To add a row, I am utilizing an ng-click function attached to the "add" button on the page:
$scope.addRow = function () {
$scope.hsCodes.unshift({});
};
While this method does successfully add a row, it also includes empty TD elements just like the others.
The question is: How can I ensure that only the newly added row(s) contain input (text) controls?