MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / getNgAttribute

Function getNgAttribute

lib/test/angular/1.5.0/angular.js:1443–1452  ·  view source on GitHub ↗
(element, ngAttr)

Source from the content-addressed store, hash-verified

1441var ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-'];
1442
1443function getNgAttribute(element, ngAttr) {
1444 var attr, i, ii = ngAttrPrefixes.length;
1445 for (i = 0; i < ii; ++i) {
1446 attr = ngAttrPrefixes[i] + ngAttr;
1447 if (isString(attr = element.getAttribute(attr))) {
1448 return attr;
1449 }
1450 }
1451 return null;
1452}
1453
1454/**
1455 * @ngdoc directive

Callers 1

angularInitFunction · 0.70

Calls 1

isStringFunction · 0.70

Tested by

no test coverage detected