Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit aa53cf8

Browse files
committed
docs(compile): document $attrs.$normalize
1 parent a1c5f2b commit aa53cf8

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

src/ng/compile.js

+17-7
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,23 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
907907
};
908908

909909
Attributes.prototype = {
910+
/**
911+
* @ngdoc method
912+
* @name $compile.directive.Attributes#$normalize
913+
* @kind function
914+
*
915+
* @description
916+
* Converts all accepted directives format into proper directive name.
917+
* All of these will become 'myDirective':
918+
* my:Directive
919+
* my-directive
920+
* x-my-directive
921+
* data-my:directive
922+
*
923+
* Also there is special case for Moz prefix starting with upper case letter.
924+
*
925+
* @param {string} name Name to normalize
926+
*/
910927
$normalize: directiveNormalize,
911928

912929

@@ -2485,13 +2502,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
24852502
var PREFIX_REGEXP = /^((?:x|data)[\:\-_])/i;
24862503
/**
24872504
* Converts all accepted directives format into proper directive name.
2488-
* All of these will become 'myDirective':
2489-
* my:Directive
2490-
* my-directive
2491-
* x-my-directive
2492-
* data-my:directive
2493-
*
2494-
* Also there is special case for Moz prefix starting with upper case letter.
24952505
* @param name Name to normalize
24962506
*/
24972507
function directiveNormalize(name) {

0 commit comments

Comments
 (0)