Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/23.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.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 ie不';t拾取ng模型更改角度js_Javascript_Angularjs_Angularjs Ng Click_Angular Ngmodel - Fatal编程技术网

Javascript ie不';t拾取ng模型更改角度js

Javascript ie不';t拾取ng模型更改角度js,javascript,angularjs,angularjs-ng-click,angular-ngmodel,Javascript,Angularjs,Angularjs Ng Click,Angular Ngmodel,我以前问过这个问题,但还是不走运。我有一个简单的文本输入,附带一个模型,如下所示: <input type="text" ng-model="testingInput"/> <a ng-click="pushValue(testingInput)" class="button">Submit value</a> $scope.testingInput = 0; $scope.pushValue = function(val){

我以前问过这个问题,但还是不走运。我有一个简单的文本输入,附带一个模型,如下所示:

<input type="text" ng-model="testingInput"/>
<a ng-click="pushValue(testingInput)" class="button">Submit value</a>

$scope.testingInput = 0;
        $scope.pushValue = function(val){
           console.log(val);
           console.log($scope.testingInput);
        }

提交值
$scope.testingInput=0;
$scope.pushValue=函数(val){
控制台日志(val);
log($scope.testingInput);
}
目标是首先在输入框中显示0,然后用户可以更改它。当启动ng click时,它应该返回用户输入的新值。然而,在IE8和IE9上,它一直记录原始值0

我是否应该在旧版IE浏览器上使用兼容技术,还是应该正常工作


如果有帮助的话,我正在使用angular 1.2.28。

在使用IE8时,在angular控制器中使用
console.log()
时,您似乎会遇到问题,请看一下这个。尝试angular$log服务。

ng click事件在何时何地触发?我们似乎缺少一些代码。:)@saeraphin Woops,我现在在按钮中添加了html