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

Function getNgAttribute

test/angular/1.6/angular.js:1636–1645  ·  view source on GitHub ↗
(element, ngAttr)

Source from the content-addressed store, hash-verified

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

Callers 1

angularInitFunction · 0.70

Calls 1

isStringFunction · 0.70

Tested by

no test coverage detected