ng-option过滤器angularjs中的$ scope变量访问

时间:2016-11-21 15:52:08

标签: angularjs angularjs-scope

如何在过滤器选项中访问$ scope变量请帮帮我。

       $scope.Profile = Auth.getCurrentUserSync();

HTML

 <select class="form-control" name="customer" id="customer" ng-model="postjobcustomerCtrl.selectedCustomer" ng-options="customer.full_name for customer in postjobcustomerCtrl.atlasCustomers  | filter:{full_name:"+Profile.full_name+"} track by customer.user_id"
                                            ng-change="postjobcustomerCtrl.selectDefaultAddress()" required></select>

1 个答案:

答案 0 :(得分:2)

只需使用$scope变量而不进行任何插值:

filter:{full_name: Profile.full_name }