My select dropdown, needs the class of btn-success if 2 variables form a JSON object != null.
What I've tried so far which isn't working, basically if term.tag and term.id are not null, add the class btn-success to the select.
This is inside of an ng-repeat term in terms is the JSON data.
<select ng-class="{ 'btn-success': term.tag != null && term.id != null }">
<option value="companies">companies</option>
<option value="news">news</option>
<option value="people">people</option>
<option value="products">products</option>
</select>
How would you go about this?
term.tag && term.id.<select ng-class="term.tag && term.id ? 'btn-success' : 'btn-default'">To left of : is if true, to right of : is false.