Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

select2 data-ng-repeat fix issue #215

Corrects problem with select2 plugin not functioning properly if options
repeated using data-ng-repeat attribute rather than ng-repeat
  • Loading branch information...
commit 1573a0210e730af1c43234681332a8a13f1e7b25 1 parent db22f32
PeteAppleton authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 modules/directives/select2/select2.js
4 modules/directives/select2/select2.js
View
@@ -20,9 +20,9 @@ angular.module('ui.directives').directive('uiSelect2', ['ui.config', '$http', fu
// Enable watching of the options dataset if in use
if (tElm.is('select')) {
- repeatOption = tElm.find('option[ng-repeat]');
+ repeatOption = tElm.find('option[ng-repeat], option[data-ng-repeat]');
if (repeatOption.length) {
- watch = repeatOption.attr('ng-repeat').split(' ').pop();
+ watch = (repeatOption.attr('ng-repeat') || repeatOption.attr('data-ng-repeat')).split(' ').pop();
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.