在输入文本框的占位符中呈现特殊字符

Ami*_*oda 2 unicode placeholder angularjs

我需要显示(●)作为文本输入的占位符.但它们并没有渲染只是在占位符中显示unicode.请帮帮我

<input type="text" ng-model="inputText" placeholder="{{somePlaceholder}}" />
Run Code Online (Sandbox Code Playgroud)

在控制器中:

$scope.somePlaceholder = '&#9679;&#9679;';
Run Code Online (Sandbox Code Playgroud)

小提琴 - http://jsfiddle.net/Lvc0u55v/8334/

roe*_*and 5

这是javaScript,你必须使用\u转义为Unicode字符.

$scope.somePlaceholder = '\u25cf\u25cf';
Run Code Online (Sandbox Code Playgroud)

或者只是按字面意思写出这些点(假设您的脚本的编码由Web服务器正确声明).

$scope.somePlaceholder = '??';
Run Code Online (Sandbox Code Playgroud)