angular: toggle text of button based on boolean value in model
Should use like that :
<button> {{ cond_vall == true ? 'Case 1' : 'Case 2' }}</button>
I guess it depends on what the text is that you are trying to show. If you have control over what the text is in the controller, you can bind the text to a scope variable and set it in the controller so you don't have to put any logic in the view. Something like:
<button>{{someScopeVarWithYourString}}</button>
Otherwise, you can use an ng-if or ng-show on the boolean condition.
<button ng-show="someBoolValue">some text</button>
<button ng-show="!someBoolValue">some other text</button>
Because I needed to use a filter (translate filter) for the button text, the following solution worked best for me:
<button>
<span> {{ condition ? 'some_text' : 'some_Other_text' | translate }}</span>
</button>