(element, ngAttr)
| 1204 | var ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-']; |
| 1205 | |
| 1206 | function getNgAttribute(element, ngAttr) { |
| 1207 | var attr, i, ii = ngAttrPrefixes.length; |
| 1208 | element = jqLite(element); |
| 1209 | for (i = 0; i < ii; ++i) { |
| 1210 | attr = ngAttrPrefixes[i] + ngAttr; |
| 1211 | if (isString(attr = element.attr(attr))) { |
| 1212 | return attr; |
| 1213 | } |
| 1214 | } |
| 1215 | return null; |
| 1216 | } |
| 1217 | |
| 1218 | /** |
| 1219 | * @ngdoc directive |
no test coverage detected