If you don't move the button into the ng-repeat
element, there will only be one button for the entire form. Therefore, the user will not be selecting any column or row at the moment they press the button.
One could get around that by changing the prescribed user behavior:
- First: the user clicks the row/column as per normal
- Second: the user then clicks the button, which shows the alert.
The button would be:
click