How to validate table row data with Angular?

后端 未结 4 1674
醉梦人生
醉梦人生 2021-02-09 16:42

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

4条回答
  •  失恋的感觉
    2021-02-09 16:54

    Approaches for this problem (incremental):

    1. (optional) Don't use a table. use nested lists and force it with css to look like a table.

    2. Do it in the Angularish way: use a custom directive on the table cells/rows (whatever) the directive should watch the cell content for changes and then run a any custom validation and logic you have.

提交回复
热议问题