![](/img/trans.png)
[英]ng-option within ng-repeat how do I update the model not to include a selected value from another select box
[英]How can I Apply title/ tooltip / popover on options of select by using ng-option/ ng-repeat
我想在選擇標記的選項上動態應用彈出框,而不是在選擇標記上,但是在選項上,這是我的代碼
您可以進一步參考此代碼,我需要在其中應用工具提示
<select class="form-control" ng-model="selectedCategory2" id="category" style="width:280px;" name="category" ng-change="onselectedchange2(selectedCategory2,DomainLoginId,selectedCategory3)" popover="{{allow}}" popover-trigger="mouseenter" popover-placement="right required>
<option ng-repeat=" item in groupData" value="{{item.sso_access_type}}" title="{{allow}}">{{item.sso_access_type}}</option>
</select>
按照這段代碼,我在Firefox中得到的輸出是
<option ng-repeat=" item in groupData" value="S_Adv-Type6" title="Read-Only Access, S Budgets , S Billing" class="ng-binding ng-scope">S_Adv-Type6</option>
<option ng-repeat=" item in groupData" value="S_Adv-Type6" title="Read-Only Access, S Budgets , S Billing" class="ng-binding ng-scope">S_Adv-Type6</option>
您可以看到兩個選項的標題都相同,但我希望它與控制器中的標題不同。
下面是我想要的圖像鏈接 1 :https://i.stack.imgur.com/P32Zl.jpg
在groupData的每個項目中設置允許鍵
$scope.groupData = [
{sso_access_type = 'one' , allow:'allowOne'},
{sso_access_type = 'tow' , allow:'allowTow'}
];
並設置這樣的選項
<option ng-repeat=" item in groupData" value="{{item.sso_access_type}}" title="{{item.allow}}">{{item.sso_access_type}}</option>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.