(element, ngAttr)
| 1187 | var ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-']; |
| 1188 | |
| 1189 | function getNgAttribute(element, ngAttr) { |
| 1190 | var attr, i, ii = ngAttrPrefixes.length; |
| 1191 | element = jqLite(element); |
| 1192 | for (i = 0; i < ii; ++i) { |
| 1193 | attr = ngAttrPrefixes[i] + ngAttr; |
| 1194 | if (isString(attr = element.attr(attr))) { |
| 1195 | return attr; |
| 1196 | } |
| 1197 | } |
| 1198 | return null; |
| 1199 | } |
| 1200 | |
| 1201 | /** |
| 1202 | * @ngdoc directive |
no test coverage detected