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

Function getNgAttribute

test/angular/1.7/angular.js:1633–1642  ·  view source on GitHub ↗
(element, ngAttr)

Source from the content-addressed store, hash-verified

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

Callers 1

angularInitFunction · 0.70

Calls 1

isStringFunction · 0.70

Tested by

no test coverage detected