Closed jessonjoy closed 8 years ago
+1
Seems like you would need some other interface (in the current state of the app) to remove an image, which doesn't make much sense.
You just need to remove images from the array you pass to the directive. Don't think it would make much sense to have that method in the directive but, of course, open for discussion
I made a custom directive to simulate a select/delete view, basically what it does is to add a css class to the item (red background) and push it to another array, then if you tap on it again, i remove the css class and splice the array. Then when the user taps on delete, I delete the items on the new array out of the original photos array.
Here is a GIF with the functionality:
I don't know if this is what you meant for deleting functionality, but I can share my code if it works for you.
+1
+1 Nice work -- any chance to share the source code?
I want to display images but also have ability to delete them from the UI and the backing array..