MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / groupScan

Function groupScan

code/songhop/www/lib/angular/angular.js:7194–7216  ·  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

7192 * @returns {*}
7193 */
7194 function groupScan(node, attrStart, attrEnd) {
7195 var nodes = [];
7196 var depth = 0;
7197 if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {
7198 do {
7199 if (!node) {
7200 throw $compileMinErr('uterdir',
7201 "Unterminated attribute, found '{0}' but no matching '{1}' found.",
7202 attrStart, attrEnd);
7203 }
7204 if (node.nodeType == NODE_TYPE_ELEMENT) {
7205 if (node.hasAttribute(attrStart)) depth++;
7206 if (node.hasAttribute(attrEnd)) depth--;
7207 }
7208 nodes.push(node);
7209 node = node.nextSibling;
7210 } while (depth > 0);
7211 } else {
7212 nodes.push(node);
7213 }
7214
7215 return jqLite(nodes);
7216 }
7217
7218 /**
7219 * 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