From 4fc159073985f3e6d2ba466e75ac03fb5984f888 Mon Sep 17 00:00:00 2001 From: Ciro Nunes Date: Fri, 5 Dec 2014 14:34:15 -0200 Subject: [PATCH] docs(compile): document $attrs.$normalize --- src/ng/compile.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/ng/compile.js b/src/ng/compile.js index 4d89e8795e2d..b4d573e1230a 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -907,6 +907,21 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { }; Attributes.prototype = { + /** + * @ngdoc method + * @name $compile.directive.Attributes#$normalize + * @kind function + * + * @description + * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with `x-` or + * `data-`) to its normalized, camelCase form. + * + * Also there is special case for Moz prefix starting with upper case letter. + * + * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives} + * + * @param {string} name Name to normalize + */ $normalize: directiveNormalize, @@ -2485,13 +2500,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { var PREFIX_REGEXP = /^((?:x|data)[\:\-_])/i; /** * Converts all accepted directives format into proper directive name. - * All of these will become 'myDirective': - * my:Directive - * my-directive - * x-my-directive - * data-my:directive - * - * Also there is special case for Moz prefix starting with upper case letter. * @param name Name to normalize */ function directiveNormalize(name) {