MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / groupScan

Function groupScan

lib/test/angular/1.5.0/angular.js:8381–8403  ·  view source on GitHub ↗

* Given a node with an 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

8379 * @returns {*}
8380 */
8381 function groupScan(node, attrStart, attrEnd) {
8382 var nodes = [];
8383 var depth = 0;
8384 if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {
8385 do {
8386 if (!node) {
8387 throw $compileMinErr('uterdir',
8388 "Unterminated attribute, found '{0}' but no matching '{1}' found.",
8389 attrStart, attrEnd);
8390 }
8391 if (node.nodeType == NODE_TYPE_ELEMENT) {
8392 if (node.hasAttribute(attrStart)) depth++;
8393 if (node.hasAttribute(attrEnd)) depth--;
8394 }
8395 nodes.push(node);
8396 node = node.nextSibling;
8397 } while (depth > 0);
8398 } else {
8399 nodes.push(node);
8400 }
8401
8402 return jqLite(nodes);
8403 }
8404
8405 /**
8406 * 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