My table has rows that use their respective scope variables for conditional rendering:
<tr ng-repeat="row in data">
<input type="text" data-ng-show="editMode" data-ng-model="row.smth"/>
The input is only shown when the row's scope variable editMode
is true, and it works perfectly fine.
Now I want to add a new row dynamically:
$scope.data.push(my_new_row)
This operation works well. But then I wish to set the new row's scope variable editMode
to something, and I'm currently lacking ideas on how to achieve this.
I am aware of an undocumented method involving $$childHead, but I find it inelegant.