MCPcopy
hub / github.com/angular-ui/ui-router / groupScan

Function groupScan

test/angular/1.7/angular.js:10050–10072  ·  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

10048 * @returns {*}
10049 */
10050 function groupScan(node, attrStart, attrEnd) {
10051 var nodes = [];
10052 var depth = 0;
10053 if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {
10054 do {
10055 if (!node) {
10056 throw $compileMinErr('uterdir',
10057 'Unterminated attribute, found \'{0}\' but no matching \'{1}\' found.',
10058 attrStart, attrEnd);
10059 }
10060 if (node.nodeType === NODE_TYPE_ELEMENT) {
10061 if (node.hasAttribute(attrStart)) depth++;
10062 if (node.hasAttribute(attrEnd)) depth--;
10063 }
10064 nodes.push(node);
10065 node = node.nextSibling;
10066 } while (depth > 0);
10067 } else {
10068 nodes.push(node);
10069 }
10070
10071 return jqLite(nodes);
10072 }
10073
10074 /**
10075 * 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