
AngularJS
如何有条件地在
html<table> <tr ng-repeat="student in students" ng-class="{'high-score': student.score >= 90, 'low-score': student.score < 60}"> <td>{{ student.name }}</td> <td>{{ student.score }}</td> </tr></table>在这个例子中,我们使用了ng-repeat指令来重复显示学生数据。在Copyright © 2025 IZhiDa.com All Rights Reserved.
知答 版权所有 粤ICP备2023042255号