我想要一个包含2个按钮的ng-repeat,可以打开2个不同的模态。我的问题是第一个按钮成功打开其模态,但第二个按钮没有。
这是我的HTML
<div class="column" ng-repeat="eventObj in events" ng-repeat-dimmer>
...
<button class="circular ui icon green button" id="edit-event" data-inverted="" data-variation="tiny basic" ng-click="getCurrent(eventObj)" ng-repeat-modal-btn></button>
<button class="circular ui icon red button" id="delete-event" data-inverted="" data-variation="tiny basic" ng-click="getCurrent(eventObj)" ng-repeat-modal-btn></button>
...
</div>
这是我的两个模态
<div class="ui edit-event modal">
<i class="close icon"></i>
...
<form>
...
<div class="field">
<button class="ui button" type="submit" ng-click="editEvent()">Submit</button>
</div>
</form>
</div>
<div class="ui delete-event modal">
<div class="header">Delete Event</div>
<div class="content">
<div class="ui form content">
Are you sure you want to delete {{eventObj.eventName}}?
</div>
</div>
<div class="actions">
<div class="ui green button" ng-click="deleteEvent(eventObj,$event)">Delete Event</div>
<div class="ui black cancel button">Cancel</div>
</div>
同样,我想知道为什么我的第二个按钮在第一个按钮不起作用的时候,谢谢!