I have angular and Jquery working on my page. How would I go about deleting the image element through the function in my controller? I figured $(this).remove() would handle it, but nothing happens. Any suggestions would be appreciated.
View
<li class="moment_block" ng-repeat="moment in moments" ng-class="{noDisplay: !moment.screenshotUrl}">
<div><p>{{moment.title ? moment.title : "No caption"}}</p> <img src="img/filledHeart.png" alt="fave" ng-click="addToStorage(moment.title, moment.screenshotUrl)"/></div>
<img src="{{moment.screenshotUrl}}" alt="{{moment.title}}"/>
</li>
Controller
$scope.addToStorage = function(title, imgUrl){
$(this).remove();
}