5
<input type="submit" value="Create new order" />

How do I set the 'value' attribute based on a $scope variable?

2 Answers 2

10

http://plnkr.co/edit/DZWzN4D9QzzBCpetSYtF?p=preview

<input type="submit" value="{{model}}" />

In your controller:

$scope.model = "Create new order";
Sign up to request clarification or add additional context in comments.

Comments

1

Like so:

<input type="submit" value="{{scopeVar}}" />

$scope.scopeVar = "some value";

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.