How to use jQuery Select2 with AngularJS

前端 未结 4 1647
醉酒成梦
醉酒成梦 2021-01-18 15:47

I am trying to use jQuery (2.2.1) Select2 (3.5.2) with Angularjs (1.5) but am having a difficult time grabbing the data from the select box. I have tried ui-select and I co

4条回答
  •  深忆病人
    2021-01-18 16:19

    After searching how to access $scope functions from jQuery, I found that using the angular.element.scope().function(x) would allow me to pass the key for each select2 element, on the "change" event, into angular, which can then be manipulated.

    
    

提交回复
热议问题