MCPcopy
hub / github.com/angular-ui/ui-grid / getNgAttribute

Function getNgAttribute

lib/test/angular/1.8.0/angular.js:1634–1643  ·  view source on GitHub ↗
(element, ngAttr)

Source from the content-addressed store, hash-verified

1632var ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-'];
1633
1634function getNgAttribute(element, ngAttr) {
1635 var attr, i, ii = ngAttrPrefixes.length;
1636 for (i = 0; i < ii; ++i) {
1637 attr = ngAttrPrefixes[i] + ngAttr;
1638 if (isString(attr = element.getAttribute(attr))) {
1639 return attr;
1640 }
1641 }
1642 return null;
1643}
1644
1645function allowAutoBootstrap(document) {
1646 var script = document.currentScript;

Callers 1

angularInitFunction · 0.70

Calls 1

isStringFunction · 0.70

Tested by

no test coverage detected