Javascript 多个ng选项设置默认选项选择不工作

Javascript 多个ng选项设置默认选项选择不工作,javascript,angularjs,ng-options,Javascript,Angularjs,Ng Options,我有一个问题,选择一个默认值的角度选择。 如果我的选择选项只有一个值,它就可以正常工作 <select id="customerId" ng-model="customer" ng-options="customer.id for customer in customersSelect"> </select> 但是,如果我尝试在ng options上使用多个元素,并且设置了默认选项,则不起作用 <select id="custom

我有一个问题,选择一个默认值的角度选择。 如果我的选择选项只有一个值,它就可以正常工作

<select id="customerId"
        ng-model="customer"
        ng-options="customer.id  for customer in customersSelect">
</select>
但是,如果我尝试在
ng options
上使用多个元素,并且设置了默认选项,则不起作用

<select id="customerId"
        ng-model="customer"
        ng-options="customer.id as customer.name for customer in customersSelect">
</select>


有什么想法吗?

您可以使用
选项
标签。如下所示:

   <select 
        id="customerId"
        ng-model="customer"
        ng-options="customer.id as customer.name for customer in customersSelect">
       <option value="">PLease select one</option>
</select>                          

请选择一个

就是这样。

您可以使用
选项
标记。如下所示:

   <select 
        id="customerId"
        ng-model="customer"
        ng-options="customer.id as customer.name for customer in customersSelect">
       <option value="">PLease select one</option>
</select>                          

请选择一个
就这样。

这有用吗?这有用吗?