第一个元素html代码:
<div class="block ng-scope" ng-repeat="skills in data.primary_skills">
<div class="block skillsLineItem" ng-class="{manditorySkillsLineItem:skills.mandatory, skillsLineItem:!skills.mandatory}">
<label title="Testing" class="skill-name col-xs-5 text-overflow-ellipsis ng-binding" ng-click="toggleMandatory(skills)">
<!-- ngIf: skills.mandatory -->
<!-- ngIf: skills.userdefined -->
Testing
</label>
第二个元素Html代码
<label title="Test Scripts" class="skill-name col-xs-5 text-overflow-ellipsis ng-binding" ng-click="toggleMandatory(skills)">
<!-- ngIf: skills.mandatory -->
<!-- ngIf: skills.userdefined -->
Test Scripts
</label>
在我们的应用程序中,多个元素具有相同的类名和ng-click值,因此如何使用相同的类或ng-click值单击多个元素。我必须点击这两个元素,所以请帮助我。
答案 0 :(得分:2)