Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/447.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何在jQuery回调中设置ng模型_Javascript_Jquery_Angularjs - Fatal编程技术网

Javascript 如何在jQuery回调中设置ng模型

Javascript 如何在jQuery回调中设置ng模型,javascript,jquery,angularjs,Javascript,Jquery,Angularjs,{{Form::hidden('point',null,['ng-model'=>'evaluationData.point','id'=>'point value'])} 但是当我提交表单时,我没有得到评估数据。请尝试将该脚本包装到指令中 onFinish: function (data) { $('#point-value').val(data.from); } 谢谢你的回复。但是我的ng模型值仍然没有设置。调用了onFinish函数,但是ng模型值仍然没有设置。 onFinish:

{{Form::hidden('point',null,['ng-model'=>'evaluationData.point','id'=>'point value'])}


但是当我提交表单时,我没有得到
评估数据。请尝试将该脚本包装到指令中

onFinish: function (data) {
   $('#point-value').val(data.from);
}

谢谢你的回复。但是我的ng模型值仍然没有设置。调用了
onFinish
函数,但是ng模型值仍然没有设置。
onFinish: function (data) {
   $('#point-value').val(data.from);
}
angular.module('myApp').directive('myDirective', function() {
    return {
        scope: 'ngModel',
        link: function(scope, element, attrs) {
            $("#point-range").ionRangeSlider({
                min: 0,
                max: 10,
                from: 1,
                from_min: 1,
                from_max: 10,
                step: 1,
                grid: true,
                hide_min_max: true,
                onFinish: function (data) {
                    $('#point-value').val(data.from);
                    scope.ngModel = 'Blah';
                    scope.$digest();
                }
            });
        }
    }
})