Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何选择ng选项选择angularjs?_Angularjs_Select_Ng Options - Fatal编程技术网

如何选择ng选项选择angularjs?

如何选择ng选项选择angularjs?,angularjs,select,ng-options,Angularjs,Select,Ng Options,编辑产品时,我希望自动选择此ng选项。我该怎么做 <div ng-if="field.name=='ProductId'" class="input-group inputFill"> <select ng-disabled="defaultSaveButtons[$index]" class="form-control inputFill2" ng-model="field.value" ng-o

编辑产品时,我希望自动选择此
ng选项
。我该怎么做

<div ng-if="field.name=='ProductId'" class="input-group inputFill">
    <select ng-disabled="defaultSaveButtons[$index]"
            class="form-control inputFill2"
            ng-model="field.value"
            ng-options="product.id as product.name for product in dropdown.productOptions  | orderBy:'name'
                track by product.id ">
    </select>
</div>