I have table
with ng-repeat
for table rows. I want to make inline editing and validation of data from single row, but it is impossible to use for
I don't think you need to hide your inputs in tds, you could just use CSS to make them fill the td, with no border for example.
As @alonisser said, the angular-way is to create a directive to handle that. To solve my similar case, I created a 'super' table directive which provide my table template and handle its behavior. About the template: I wrapped the table into a form ;)
HTML example:
directive example:
angular.module('myApp').directive('superTable', function() {
return {
restrict: 'A',
templateUrl: 'partials/super-table.html',
link: function($scope, $elem, $attrs) {
$elem.on('blur', function(e) {
//do something
});
}
}
});