Issue
What is a simple way to change the text in a button element based on a boolean value?
pseudo code:
<button> some text OR some other text </button>
I read this: Angularjs if-then-else construction in expression
and this regarding ng-switch: http://docs.angularjs.org/api/ng.directive:ngSwitch
Neither seems to work using bool value from model
Solution
Should use like that :
<button> {{ cond_vall == true ? 'Case 1' : 'Case 2' }}</button>
Answered By - RockOnGom
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.