【发布时间】:2016-02-27 10:46:49
【问题描述】:
我正在尝试使用 angularjs.The code is here in JSFIDDLE 创建一个复选框指令
它只适用于 ng-model 和文本。
但是如果我添加 ng-true-value 和 ng-false 值,它会抛出错误
nged2angular.js:12520 Error: [ngModel:constexpr] Expected constant expression for `ngTrueValue`, but saw `bindedTrueValue`.
我还需要在指令中使用 ng-change 控制器功能。
【问题讨论】:
标签: angularjs checkbox directive