Is it possible to call a method only when a condition in ng-if is true?
Can you please explain the scenario? Or share the piece of code
I have a list with many objects. The objects are of different types like contacts, images, files etc.
When it is a image i want to call a method to download it
How you are going to get the data to your UI? Please share code
Are you looking to perform this action as part of a click?
If so, you can do the following, I do this on my ion-cards
<ion-card (click)=" isImage ? doImageFunction(anyImageData) : ‘’">
bind to the click event and check if the item is an image, if not, do nothing.