I have this function in jQuery
$('.cancelPending').live('click', function(){
if($(this).hasClass('opacity')){ return false; }
$(this).addClass('opacity').html('<i class="icon icon-remove"></i>Cancelling...');
var id = $(this).parents('.holiday').getId();
//Etc...
How would I recreate that in Angular? So far I have just the empty function set up
<a class="cancelPending" ng-click="cancePending(p.id)" href="#"><i class="icon icon-remove"></i>Cancel Request</a>
...
$scope.cancelPending = function(id) {
}
What's the Angular way to manipulate the classes/html of an element? I think for the class it will be ng-class="{opacity: someVariable?}"
but I can't think what the HTML would be.