diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Parser.js | 11 | ||||
| -rw-r--r-- | src/widgets.js | 3 |
2 files changed, 2 insertions, 12 deletions
diff --git a/src/Parser.js b/src/Parser.js index 8e42f18a..dfe56cc9 100644 --- a/src/Parser.js +++ b/src/Parser.js @@ -372,16 +372,7 @@ Parser.prototype = { for ( var i = 0; i < argsFn.length; i++) { args.push(argsFn[i](self)); } - var pipeThis = function(){ - var _this = this; - foreach(self, function(v, k) { - if (k.charAt(0) == '$') { - _this[k] = v; - } - }); - }; - pipeThis.prototype = self.self; - return fn.apply(new pipeThis(), args); + return fn.apply(self.state, args); }; return function(){ return fnInvoke; diff --git a/src/widgets.js b/src/widgets.js index 376518e9..e89e8ca4 100644 --- a/src/widgets.js +++ b/src/widgets.js @@ -27,7 +27,7 @@ function valueAccessor(scope, element) { required = required || required === ''; if (!validator) throw "Validator named '" + validatorName + "' not found."; function validate(value) { - var error = required && !trim(value) ? "Required" : validator({self:scope, scope:{get:scope.$get, set:scope.$set}}, value); + var error = required && !trim(value) ? "Required" : validator({state:scope, scope:{get:scope.$get, set:scope.$set}}, value); if (error !== lastError) { elementError(element, NG_VALIDATION_ERROR, error); lastError = error; @@ -242,7 +242,6 @@ angularWidget('NG:SWITCH', function ngSwitch(element){ } } }); - console.log(regex); var match = on.match(new RegExp(regex)); if (match) { foreach(params, function(name, index){ |
