ngGallery
ngGallery copied to clipboard
Implemented a delete action as per #41
Can now delete an image by setting delete-icons to true and clicking the delete icon on either the thumbnail or gallery. Confirms with the user if they want to delete the image. Will go to the last image in the array after the delete action has occurred. A on-delete callback has also been implemented. Supports edge cases such as an empty images array.
Example usage:
<ng-gallery images="ctrl.images" delete-icons="true" on-delete="ctrl.callback()"></ng-gallery>
Can you post an example of how to use the onDelete callback from the angularjs controller? The callback isn't being called in the controller when I use your implementation.
It's almost as if scope.onDelete({image: image});
isn't actually calling the callback function defined in the controller (passed into the directive as such: <ng-gallery images="images" onDelete="imageDeletedFromGallery()" ng-if="images.length"> </ng-gallery>
EDIT:
Nevermind, I found the solution to my problem here