angularjs - Change value of input placeholder via model? -
i'm trying change value of input placeholder controller cant quite figure out how.
input(type='text', ng-model='inputtext', side='30', placeholder='enter username')
is there way modify model's element attributes?
you can bind variable in controller:
<input type="text" ng-model="inputtext" placeholder="{{someplaceholder}}" />
in controller:
$scope.someplaceholder = 'abc';
Comments
Post a Comment