Could someone please help with setting a condition in ng-repeat inside a custom directive call?
<map-marker ng-repeat='obj in objects'
title= 'obj.name'
latitude= 'obj.last_point().latitude'
longitude= 'obj.last_point().longitude'
click= 'state.toggle_selected(obj)'
icon= 'obj.toggle_icon()'>
</map-marker>
I am trying to display a marker on my map only if the obj has a last_point():
<map-marker ng-repeat='obj in objects' ng-if='obj.last_point()' ...
The map-marker is defined as a custom directive.
I have been struggling to find a solution for this. Any ideas on how I can achieve this? Thank you in advance!
Appreciate your assistance.