From 4f22d6866c052fb5b770ce4f377cecacacd9e6d8 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 23 Dec 2010 00:44:27 +0100 Subject: complete rewrite of documentation generation - romeved mustache.js - unified templates - improved testability of the code --- src/Angular.js | 2 +- src/validators.js | 12 +++++++++--- src/widgets.js | 3 ++- 3 files changed, 12 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Angular.js b/src/Angular.js index 59b031cc..00e1d2a2 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -711,7 +711,7 @@ function concat(array1, array2, index) { */ function bind(self, fn) { var curryArgs = arguments.length > 2 ? slice.call(arguments, 2, arguments.length) : []; - if (typeof fn == $function) { + if (typeof fn == $function && !(fn instanceof RegExp)) { return curryArgs.length ? function() { return arguments.length ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0, arguments.length))) : fn.apply(self, curryArgs); }: function() { diff --git a/src/validators.js b/src/validators.js index 8030c0d0..e9a5feb9 100644 --- a/src/validators.js +++ b/src/validators.js @@ -9,13 +9,19 @@ extend(angularValidator, { * Use regexp validator to restrict the input to any Regular Expression. * * @param {string} value value to validate - * @param {regexp} expression regular expression. + * @param {string|regexp} expression regular expression. + * @param {string=} msg error message to display. * @css ng-validation-error * * @example - * + * * Enter valid SSN: - * + *
+ * + *
* * @scenario * it('should invalidate non ssn', function(){ diff --git a/src/widgets.js b/src/widgets.js index 5f159990..473b6f1f 100644 --- a/src/widgets.js +++ b/src/widgets.js @@ -554,7 +554,8 @@ angularWidget('option', function(){ * (e.g. ng:include won't work for file:// access). * * @param {string} src expression evaluating to URL. - * @param {Scope=} [scope=new_child_scope] expression evaluating to angular.scope + * @param {Scope=} [scope=new_child_scope] optional expression which evaluates to an + * instance of angular.scope to set the HTML fragment to. * @param {string=} onload Expression to evaluate when a new partial is loaded. * * @example -- cgit v1.2.3