MCPcopy Create free account
hub / github.com/angular-ui/ui-router / groupScan

Function groupScan

test/angular/1.5/angular.js:8983–9005  ·  view source on GitHub ↗

* Given a node with a directive-start it collects all of the siblings until it finds * directive-end. * @param node * @param attrStart * @param attrEnd * @returns {*}

(node, attrStart, attrEnd)

Source from the content-addressed store, hash-verified

8981 * @returns {*}
8982 */
8983 function groupScan(node, attrStart, attrEnd) {
8984 var nodes = [];
8985 var depth = 0;
8986 if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {
8987 do {
8988 if (!node) {
8989 throw $compileMinErr('uterdir',
8990 'Unterminated attribute, found \'{0}\' but no matching \'{1}\' found.',
8991 attrStart, attrEnd);
8992 }
8993 if (node.nodeType === NODE_TYPE_ELEMENT) {
8994 if (node.hasAttribute(attrStart)) depth++;
8995 if (node.hasAttribute(attrEnd)) depth--;
8996 }
8997 nodes.push(node);
8998 node = node.nextSibling;
8999 } while (depth > 0);
9000 } else {
9001 nodes.push(node);
9002 }
9003
9004 return jqLite(nodes);
9005 }
9006
9007 /**
9008 * Wrapper for linking function which converts normal linking function into a grouped

Callers 2

applyDirectivesToNodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected