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

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -