无法从 ng-repeat 获得价值

Can't get value from ng-repeat

我有这个 select 并且值显示正确但是如何在我的函数 FilterByBrand()?

中获取 selected 选项的值
<select ng-model="selectedBrand" ng-change="FilterByBrand()">
  <option ng-value="-1">--Alle Brands--</option>
  <option ng-repeat="x in Brands" ng-value="{{x.opt_Brand.Id}}">{{x.opt_Brand.Name}}</option>
</select>

不要在 ng 值内使用大括号(插值)。检查此答案以获得何时不使用插值的重要摘要 -

<select ng-model="selectedBrand" ng-change="FilterByBrand()">
  <option ng-value="-1">--Alle Brands--</option>
  <option ng-repeat="x in Brands" ng-value="x.opt_Brand.Id">{{x.opt_Brand.Name}}</option>
</select>