How can I make the text of a button change in AngularJS?

Samantha J T Star

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.

Josh

You can use the ternary operator inside a binding:

<button>{{action === "someValue" ? "Primary" : "Alternate"}}</button>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I make the button text change, from text to an empty name with a delay?

From Dev

How can I change the text with a button?

From Dev

How can I make a button not to move according to the text above it?

From Dev

How can I make the button text a specific color Xcode Swift

From Dev

how can i change the text with a button click? android studio xml

From Dev

How can I change text of button inside data table

From Dev

how i can hide/show my div with change text on button

From Dev

How can I change the text of a label when a button is checked?

From Dev

How can I change the colour of the text button in UIActionSheet?

From Dev

How can I change text of button inside data table

From Dev

how can i change the text of the button without clicked in the listview delegate?

From Dev

How can I change the text of a button which is in class element?

From Dev

When I change the text for the button in SWT, the whole button size changes. How can I disable this?

From Dev

Java/Android - How can I make a toggle button change state by pressing another button?

From Dev

How can I change radio button to contain text and look like a selectable button?

From Dev

How to make button image to change color like normal text button?

From Dev

How can I make the text area empty after I click the submit button?

From Dev

How can I make my disabled button not change color when there's a hover with CSS?

From Dev

How can I make a button change its position after being clicked?

From Dev

How can I make a button change its background color when pressed down?

From Dev

Swift... how can I make an image change when a button its pressed and return it back to normal?

From Dev

How can I make my disabled button not change color when there's a hover with CSS?

From Dev

How I can make a button for browse a folder?

From Dev

How can I make a unlink button in PHP

From Dev

How can I make the button more visible?

From Dev

How can I make a button tag to expand?

From Dev

How can I make a functioning animated button?

From Dev

How can I make a button that that triggers a script?

From Dev

How can i make a delete Button?

Related Related

  1. 1

    How can I make the button text change, from text to an empty name with a delay?

  2. 2

    How can I change the text with a button?

  3. 3

    How can I make a button not to move according to the text above it?

  4. 4

    How can I make the button text a specific color Xcode Swift

  5. 5

    how can i change the text with a button click? android studio xml

  6. 6

    How can I change text of button inside data table

  7. 7

    how i can hide/show my div with change text on button

  8. 8

    How can I change the text of a label when a button is checked?

  9. 9

    How can I change the colour of the text button in UIActionSheet?

  10. 10

    How can I change text of button inside data table

  11. 11

    how can i change the text of the button without clicked in the listview delegate?

  12. 12

    How can I change the text of a button which is in class element?

  13. 13

    When I change the text for the button in SWT, the whole button size changes. How can I disable this?

  14. 14

    Java/Android - How can I make a toggle button change state by pressing another button?

  15. 15

    How can I change radio button to contain text and look like a selectable button?

  16. 16

    How to make button image to change color like normal text button?

  17. 17

    How can I make the text area empty after I click the submit button?

  18. 18

    How can I make my disabled button not change color when there's a hover with CSS?

  19. 19

    How can I make a button change its position after being clicked?

  20. 20

    How can I make a button change its background color when pressed down?

  21. 21

    Swift... how can I make an image change when a button its pressed and return it back to normal?

  22. 22

    How can I make my disabled button not change color when there's a hover with CSS?

  23. 23

    How I can make a button for browse a folder?

  24. 24

    How can I make a unlink button in PHP

  25. 25

    How can I make the button more visible?

  26. 26

    How can I make a button tag to expand?

  27. 27

    How can I make a functioning animated button?

  28. 28

    How can I make a button that that triggers a script?

  29. 29

    How can i make a delete Button?

HotTag

Archive