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

Function getNgAttribute

test/angular/1.5/angular.js:1506–1515  ·  view source on GitHub ↗
(element, ngAttr)

Source from the content-addressed store, hash-verified

1504var ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-'];
1505
1506function getNgAttribute(element, ngAttr) {
1507 var attr, i, ii = ngAttrPrefixes.length;
1508 for (i = 0; i < ii; ++i) {
1509 attr = ngAttrPrefixes[i] + ngAttr;
1510 if (isString(attr = element.getAttribute(attr))) {
1511 return attr;
1512 }
1513 }
1514 return null;
1515}
1516
1517function allowAutoBootstrap(document) {
1518 var script = document.currentScript;

Callers 1

angularInitFunction · 0.70

Calls 1

isStringFunction · 0.70

Tested by

no test coverage detected