Javascript AngularJs unicode选择字体

Javascript AngularJs unicode选择字体,javascript,html,angularjs,unicode,font-awesome,Javascript,Html,Angularjs,Unicode,Font Awesome,我想在我的选择框中显示图标 出于静态目的,我成功地使用了以下代码: ng-options=" '' +l.Name for l in locations" 我唯一的问题是,我需要根据我所在位置的类型动态显示图标。当我在控制器中修复此问题并命名为以下名称时: if(logic){ $scope.locations[0].name = "" + $scope.locations[0].name; } 这将unicode显示为纯文本。我做错了什么

我想在我的选择框中显示图标

出于静态目的,我成功地使用了以下代码:

ng-options=" '' +l.Name for l in locations"
我唯一的问题是,我需要根据我所在位置的类型动态显示图标。当我在控制器中修复此问题并命名为以下名称时:

if(logic){
  $scope.locations[0].name = "" + $scope.locations[0].name;
}
这将unicode显示为纯文本。我做错了什么,还是遗漏了什么


非常感谢

您需要在javascript中使用unicode文本:

$scope.locations[0].name = "\uf0e7"
这是unicode文字符号