Reputation: 32838
I have a button in HTML:
<button> </button>
How can I make the change inside change depending on the value of a $scope variable?
$scope.action == Action.Authenticating
I would like it to say "Sign in" when this is false and "Signing in..." when it is true.
Upvotes: 1
Views: 49
Reputation: 44916
You can use the ternary operator inside a binding:
<button>{{action === "someValue" ? "Primary" : "Alternate"}}</button>
Upvotes: 3
Reputation: 25807
Here you go:
<button>{{action ? 'Signing in...' : 'Sign in'}}</button>
Upvotes: 2