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

Function addDirective

lib/test/angular/1.5.0/angular.js:9052–9073  ·  view source on GitHub ↗

* looks up the directive and decorates it with exception handling and proper parameters. We * call this the boundDirective. * * @param {string} name name of the directive to look up. * @param {string} location The directive must be found in specific format. * String contai

(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName,
                          endAttrName)

Source from the content-addressed store, hash-verified

9050 * @returns {boolean} true if directive was added.
9051 */
9052 function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName,
9053 endAttrName) {
9054 if (name === ignoreDirective) return null;
9055 var match = null;
9056 if (hasDirectives.hasOwnProperty(name)) {
9057 for (var directive, directives = $injector.get(name + Suffix),
9058 i = 0, ii = directives.length; i < ii; i++) {
9059 try {
9060 directive = directives[i];
9061 if ((isUndefined(maxPriority) || maxPriority > directive.priority) &&
9062 directive.restrict.indexOf(location) != -1) {
9063 if (startAttrName) {
9064 directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});
9065 }
9066 tDirectives.push(directive);
9067 match = directive;
9068 }
9069 } catch (e) { $exceptionHandler(e); }
9070 }
9071 }
9072 return match;
9073 }
9074
9075
9076 /**

Callers 1

collectDirectivesFunction · 0.70

Calls 2

isUndefinedFunction · 0.70
inheritFunction · 0.70

Tested by

no test coverage detected