ich Problem habe html Unicode von AngularJS Controller angezeigt werden. ich folgende JS-Code habenAngularJS HTML Unicode Anzeige
var mOverview = angular.module('mOverview', []);
mOverview.controller('mOverviewController', function ($scope, $sce) {
$scope.mData = [
{
'name': '↓'+'NASDAQ', // here the unicode is ↓ but the output is also ↓ which is supposed to be a down-arrow
'amount': '15,698.85',
'upDown': '+105.84'
}
];
});
Hier ist mein HTML
<div ng-app="mOverview">
<div ng-controller="mOverviewController">
<table>
<tr>
<th></th>
<th></th>
<th></th>
</tr>
<tr ng-repeat="md in mData">
<td>{{md.name}}</td>
<td>{{md.amount}}</td>
<td>{{md.upDown}}</td>
</tr>
</table>
</div>
I $ sanitize versucht() und trustAsHtml aber keinen Erfolg. Wie kann ich als "Pfeil" in meinem HTML anzeigen?
Awesome Mann, arbeiten, vielen Dank. Ich akzeptiere deine Antwort. – jeewan
Danke, ich habe mir die Haare gezogen! Beachten Sie zu denen, die folgen: es nur mit ng-bind-html zu funktionieren scheint, nicht {{}} Bindung – MaxRocket