我在角度使用了Chosen插件,这是代码的片段
<select ng-model="vendor_value" ng-options="vendor.text for vendor in vendors" ui-jq="chosen" ui-options="{width: 300px}"></select>
然后这将在浏览器中呈现
<select ng-model="category_value" ng-options="category.text for category in categories" style="border-color: red; display: none;" ui-jq="chosen" ui-options="{width: '300px', no_results_text: 'Press enter to add ', placeholder_text_single: '' }" class="ng-pristine ng-untouched ng-valid">
<option value="?" selected="selected" label=""></option>
<option value="0" label="Games">Games</option>
<option value="1" label="Baby">Baby</option>
<option value="2" label="Shoes">Shoes</option>
</select>
<div class="chosen-container chosen-container-single" style="width: 300px;" title="">
<a class="chosen-single chosen-default" tabindex="-1"> <----- I want to insert a class after form is submitted in the angular controller
<span>Select an Option</span>
</a>
<div class="chosen-drop">
<div class="chosen-search">
<input type="text" autocomplete="off">
</div>
<ul class="chosen-results"></ul>
</div>
</div>
在这一行
<a class="chosen-single chosen-default" tabindex="-1">
我想在提交表单后插入一个类。如何通过角度控制器中选择的插件在动态创建的html行中插入类?