Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.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
错误:[$compile:ctreq],Angularjs_Angularjs - Fatal编程技术网

错误:[$compile:ctreq],Angularjs

错误:[$compile:ctreq],Angularjs,angularjs,Angularjs,我有一个输入标签,如下所示: <input type="checkbox" ng-change="swap($parent.$index,$index)" ng-model="checked"> 此标记位于嵌套的ng repeat中。当我删除ng型号时,出现以下错误: 错误:[$compile:ctreq]$compile/ctreq?p0=ngModel&p1=ngChange ng change指令是否需要ng model指令?这里肯定需要ng model,因为ng cha

我有一个输入标签,如下所示:

<input type="checkbox" ng-change="swap($parent.$index,$index)" ng-model="checked">

此标记位于嵌套的
ng repeat
中。当我删除
ng型号
时,出现以下错误:

错误:[$compile:ctreq]$compile/ctreq?p0=ngModel&p1=ngChange


ng change
指令是否需要
ng model
指令?

这里肯定需要ng model,因为ng change需要检测模型上的变化

<input type="checkbox" ng-change="swap($parent.$index,$index)" ng-model="checked">

来自文档

ngChange表达式仅在输入发生更改时计算 值导致新值被。。。注意,本指令要求 我希望你能出席


这里肯定需要ng模型,因为ng change需要检测模型上的更改

<input type="checkbox" ng-change="swap($parent.$index,$index)" ng-model="checked">

来自文档

ngChange表达式仅在输入发生更改时计算 值导致新值被。。。注意,本指令要求 我希望你能出席


这正是单击链接或不使用缩小角度时获得的详细错误消息所说的:。这正是单击链接或不使用缩小角度时获得的详细错误消息所说的:。