Integration of Angular and JQuery.iCheck by using a directive is not working

前端 未结 3 1993
被撕碎了的回忆
被撕碎了的回忆 2020-12-30 02:41

I\'m trying to integrate JQuery.iCheck (plugin for checkbox&Radio buttons styling). I followed few suggestions here that said that the way to integrate a jQ

3条回答
  •  被撕碎了的回忆
    2020-12-30 03:22

    With the code from XaReSx answer I had one issue : When updating the model from the scope the radio doesn't changed. I had to add a timeout in the model watch :

    $scope.$watch($attrs['ngModel'], function (newValue) {
        $timeout(function () {
            $(element).iCheck('update');
        })
    })
    

提交回复
热议问题