Computer >> Hướng Dẫn Máy Tính >  >> Lập Trình >> JavaScript

Không lấy được giá trị radio select động trong AngularJS


Để lấy giá trị radio select, thêm [$index] vào mỗi ng-model như sau:

<td><input type = "radio" ng-model = "classes.satisfies[$index]" value = "Country1"> India</td> <td><input type = "radio" ng-model = "classes.satisfies[$index]" value = "Country 2"> US</td>

Cách trên cho kết quả động trong AngularJS.