2

I need to show dots (● ) as the placeholder of the text input. But they are not rendering just showing the unicode in the placeholder. Please help me out

<input type="text" ng-model="inputText" placeholder="{{somePlaceholder}}" />

In the controller:

$scope.somePlaceholder = '&#9679;&#9679;';

Fiddle - http://jsfiddle.net/Lvc0u55v/8334/

Community
  • 1
  • 1
Amila Iddamalgoda
  • 4,166
  • 11
  • 46
  • 85

1 Answers1

5

That's javaScript, you have to use \u escapes for Unicode characters.

$scope.somePlaceholder = '\u25cf\u25cf';

Or just write those dots literally (assuming the encoding of your script is declared properly by your web server).

$scope.somePlaceholder = '●●';
roeland
  • 5,349
  • 2
  • 14
  • 28