【发布时间】:2014-08-16 02:28:13
【问题描述】:
我正在从 json 制作一个表单。我在 tv4.js 中使用具有依赖性的 angular-schema-form。我从中学习 https://github.com/Textalk/angular-schema-form/blob/master/docs/index.md#global-options 我们可以在元素上应用 onchange 。但是当我应用它时不调用它也没有给出任何错误,为什么? 普朗克 http://plnkr.co/edit/wbziK5aRUg69JuwXDoVy?p=preview
onChange: function(modelValue,form) {
console.log("Password is",modelValue);
}
我就是这样用的
"email": {
"title": "Email",
"type": "string",
"minLength": 2,
"pattern": "^\\S+@\\S+$",
onChange: function(modelValue,form) {
console.log("Password is"+modelValue);
},
validationMessage: {
200: "Address is too short, man.",
"default": "Just write a proper address, will you?" //Special catch all error message
},
"description": "Email will be used for evil.",
required: true
},
绑定有问题吗?
【问题讨论】:
标签: javascript jquery angularjs angularjs-directive angular-schema-form