将数据添加到angular JS </option>中的<option>标记中

时间:2014-03-14 09:13:59

标签: angularjs angularjs-scope

我需要使用选项添加来自角度文件的数据。

这是脚本文件

 $http.get(url).success(function (data) {
            $scope.List1Details= data.List1Details;
             $scope.HeaderName= data.HeaderName;
        });

在视图中

 <select class="selection_light select_full_width" id="selectedTag1ID{{$index}}" ng-change="ChangeConfirmBtn($index)" ng-model="PendingEmployee.SelectedTag1ID" ng-options="Tag1.Id as Tag1.Name for Tag1 in List1Details">
 <option value="" selected>Choose {{HeaderName}}  </option>
 </select>

但显示为

  

选择{{HeaderName}}

当我在 IE 中渲染时,它显示如下。它适用于Chrome和Firefox

如何解决此问题?

1 个答案:

答案 0 :(得分:0)

我建议你用第一个选项联系你的数组,我知道angular不喜欢选项标签。