ng-change抛出错误[$ compile:ctreq]

mul*_*zzi 24 javascript jquery angularjs

我正在使用angularjs 1.2.14,代码工作正常,没有ng-change.只要我在复选框中添加ng-change代码.它会引发错误.

Error: [$compile:ctreq] http://errors.angularjs.org/1.2.14/$compile/ctreq?p0=ngModel&p1=ngChange
at Error (native).....
Run Code Online (Sandbox Code Playgroud)

有人可以帮忙吗?提前致谢.

mul*_*zzi 48

ng-change在你的元素中使用你还应该指定ng-model我错过了哪些.谢谢你的时间.


小智 9

http://plnkr.co/edit/oF8o6kU7zBDaJg4ts6TU?p=preview

见工作样本.

ng-change需要ng-model,没有它就行不通