Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/14.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
Arrays $watchGroup从array.rows获取值_Arrays_Angularjs_Watch - Fatal编程技术网

Arrays $watchGroup从array.rows获取值

Arrays $watchGroup从array.rows获取值,arrays,angularjs,watch,Arrays,Angularjs,Watch,在我的代码中,我监视多个数组,当值发生变化时,我需要从所有这些数组中获取值。我能够获取具有新值的数组,但无法从数组中获取单个值 我尝试创建一个新数组,推送整个更新的数组,然后在该数组中循环 $scope.$watchGroup([ "Flag.rows", "IncludeUserDomain.rows", "SubdomainPrefix.rows", "USERID_New.rows", "PortalURL.rows" ], function (newValues, old

在我的代码中,我监视多个数组,当值发生变化时,我需要从所有这些数组中获取值。我能够获取具有新值的数组,但无法从数组中获取单个值

我尝试创建一个新数组,推送整个更新的数组,然后在该数组中循环

$scope.$watchGroup([
    "Flag.rows", "IncludeUserDomain.rows", "SubdomainPrefix.rows",
    "USERID_New.rows", "PortalURL.rows"
], function (newValues, oldValues, scope) {
        console.log(newValues[1]);
}, true);
控制台日志输出:

我正在尝试获取qText值。但是,当我尝试以下操作时,它是未定义的:

console.log(newValues[1].qText);
使用
console.log(newValues[1][0].qText)该方法没有深度监视的可选第三个参数。只有该方法具有深度监视选项。