I want to set an title attribute if a certain a condition is true. If content is avaiblabe I want to set a class and the alt text. How can I set the title text?
HTML
<li ng-class="{true: 'my_class', false: ''}[content]" title="this is content">
You can use same technique as you used for the ng-class:
<li ng-class="{true: 'my_class', false: ''}[content]" title="{{{true: 'title true', false: 'title false'}[content]}}">
http://plnkr.co/edit/IdBxje8PUMPEK3MnenXt?p=preview
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