MCPcopy Index your code
hub / github.com/angular-ui/ui-router / collectCommentDirectives

Function collectCommentDirectives

test/angular/1.5/angular.js:8957–8973  ·  view source on GitHub ↗
(node, directives, attrs, maxPriority, ignoreDirective)

Source from the content-addressed store, hash-verified

8955 }
8956
8957 function collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective) {
8958 // function created because of performance, try/catch disables
8959 // the optimization of the whole function #14848
8960 try {
8961 var match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);
8962 if (match) {
8963 var nName = directiveNormalize(match[1]);
8964 if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {
8965 attrs[nName] = trim(match[2]);
8966 }
8967 }
8968 } catch (e) {
8969 // turns out that under some circumstances IE9 throws errors when one attempts to read
8970 // comment's node value.
8971 // Just ignore it and continue. (Can't seem to reproduce in test case.)
8972 }
8973 }
8974
8975 /**
8976 * Given a node with a directive-start it collects all of the siblings until it finds

Callers 1

collectDirectivesFunction · 0.70

Calls 3

directiveNormalizeFunction · 0.70
addDirectiveFunction · 0.70
trimFunction · 0.70

Tested by

no test coverage detected