How can i conditionally apply title in angular js
angularjs, javascript
Solution
Just do this
<span title="{{ item.status ? 'create' : 'delete'}}" class="check-{{ item.status }}"></span>
Problem
How can I conditionally apply title in angular.js ``` <span title=" Create " class="check-{{ item.status }}"></span> ``` If status equals to true, then I want to show title as Create else Delete. For class I can apply conditions like ``` ng-class="{true: 'active'}[isActive] ``` and in controller ``` $scope.isActive = true; ``` or ``` $scope.isActive = false; ``` How can I do the same in title? I tried something like: ``` title = " item.status = true | 'create' " ```