我使用角度选择选择,名为localytics.directives模块,我想在此选择输入中设置一个关键事件,我该如何获得此值?谢谢!
<select chosen
ng-change="vm.fixItem(matchedLevel,unresolved)"
disable-search="false"
ng-model="matchedLevel"
ng-options="matchedLevel as matchedLevel.Name for
matchedLevel in level.allLevelItems">
</select>
答案 0 :(得分:0)
在您选择的指令链接器函数
中尝试此代码$(".chosen-container").unbind('keyup').bind('keyup',function(e) {
//console.log('sfddf');
var searchStr = $('.chosen-container .search-field input').val();
console.log(searchStr);
});