MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / getNgAttribute

Function getNgAttribute

lib/test/angular/1.7.0/angular.js:1594–1603  ·  view source on GitHub ↗
(element, ngAttr)

Source from the content-addressed store, hash-verified

1592var ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-'];
1593
1594function getNgAttribute(element, ngAttr) {
1595 var attr, i, ii = ngAttrPrefixes.length;
1596 for (i = 0; i < ii; ++i) {
1597 attr = ngAttrPrefixes[i] + ngAttr;
1598 if (isString(attr = element.getAttribute(attr))) {
1599 return attr;
1600 }
1601 }
1602 return null;
1603}
1604
1605function allowAutoBootstrap(document) {
1606 var script = document.currentScript;

Callers 1

angularInitFunction · 0.70

Calls 1

isStringFunction · 0.70

Tested by

no test coverage detected