praveenpds praveenpds - 6 months ago 62
AngularJS Question

how to translate the html5 placeholders dynamically

I'm using angular-translate to translate the page content in to different languages.

<input type ='text' placeholder = ' {username | translate}'>

This works fine when the page loads ..but it fails to translate when I use
depending upon language dropdown changes.

Can any one kindly suggests the solution to translate the placeholders while the language changes dynamically ?


Did you try:

<input type="text" placeholder="{{ 'my.i18n.key' | translate }}" ng-model="myModel">