Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamically set text on input submit button with Angular

Tags:

angularjs

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

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

like image 641
Ian Warburton Avatar asked Aug 14 '13 16:08

Ian Warburton


Video Answer


1 Answers

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

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

In your controller:

$scope.model = "Create new order";
like image 85
Christopher Marshall Avatar answered Sep 23 '22 17:09

Christopher Marshall