angularjs - displaying placeholder in form text field -


i'm working ui bootstrap , i'm using typeahead directive. added placeholder attribute display text before typing.

my controller returns list of json , related textbox:

<input type="text"  ng-model="selected"  placeholder="data loaded via $http"  typeahead="users (users.first + ' ' + users.last + ' ' + users.gender) users in getdata($viewvalue)" class="form-control"> 

problem: when load page text box display 2 blank chars istead of palceholder.

i able fix issue white space in typehead attribute. problem version of angular , bootstrap have used. have updated plnkr. please find below updated plnkr :

updated plnkr: http://plnkr.co/edit/mbswee?p=preview 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -