aboutsummaryrefslogtreecommitdiffstats
path: root/src/Widgets.js
diff options
context:
space:
mode:
authorMisko Hevery2010-02-12 14:16:33 -0800
committerMisko Hevery2010-02-12 14:17:44 -0800
commit6cc946413622f1cef97997849e73a06a00f876fd (patch)
treeb0e4e10405fc8cd91e6d55507b3a6a02528928a9 /src/Widgets.js
parentb2a8a089b6c31c8ff176c2483f659caae4f71afb (diff)
downloadangular.js-6cc946413622f1cef97997849e73a06a00f876fd.tar.bz2
Fixed negation grouping bug
Make 'this' of validation be scope
Diffstat (limited to 'src/Widgets.js')
-rw-r--r--src/Widgets.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Widgets.js b/src/Widgets.js
index 4f359e91..71fcd110 100644
--- a/src/Widgets.js
+++ b/src/Widgets.js
@@ -234,7 +234,7 @@ TextController.prototype = {
}
var errorText = isValidationError ? "Required Value" : null;
if (!isValidationError && this.validator && value) {
- errorText = scope.validate(this.validator, value);
+ errorText = scope.validate(this.validator, value, view);
isValidationError = !!errorText;
}
if (this.lastErrorText !== errorText) {
@@ -480,7 +480,7 @@ BindUpdater.prototype = {
var part = parts[i];
var binding = Binder.binding(part);
if (binding) {
- scope.evalWidget(this, binding, {element:this.view}, function(value){
+ scope.evalWidget(this, binding, {$element:this.view}, function(value){
html.push(BindUpdater.toText(value));
}, function(e, text){
setHtml(this.view, text);
@@ -520,7 +520,7 @@ BindAttrUpdater.prototype = {
var binding = Binder.binding(attributeTemplate[i]);
if (binding) {
try {
- var value = scope.eval(binding, {element:jNode[0], attrName:attrName});
+ var value = scope.eval(binding, {$element:jNode[0], attrName:attrName});
if (value && (value.constructor !== array || value.length !== 0))
attrValues.push(value);
} catch (e) {