I have a tel filter which I will like to be applied only if a condition is meet. How can I do it?
This is my current code:
<span class="display-block" ng-show="event.category == 'Entry' && v" ng-repeat="(k, v) in properties">
<strong>{{k | sentenceCase}}:</strong> {{v | tel}}
</span>
Try to use ternary operator just like you would do in JS:
{{ condition ? (v | tel) : v }}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With