Skip to content
Permalink
Browse files

docs(compile): document $attrs.$normalize

Closes #10345
  • Loading branch information
cironunes authored and caitp committed Dec 5, 2014
1 parent 14409d7 commit 75787446eee73a58b1db3caf4e4bfde567bb7845
Showing with 15 additions and 7 deletions.
  1. +15 −7 src/ng/compile.js
@@ -653,6 +653,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,


@@ -1986,13 +2001,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) {

0 comments on commit 7578744

Please sign in to comment.
You can’t perform that action at this time.