Skip to content
This repository has been archived by the owner on May 5, 2018. It is now read-only.

Commit

Permalink
select2 data-ng-repeat fix issue #215
Browse files Browse the repository at this point in the history
Corrects problem with select2 plugin not functioning properly if options
repeated using data-ng-repeat attribute rather than ng-repeat
  • Loading branch information
PeteAppleton committed Oct 3, 2012
1 parent db22f32 commit 1573a02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/directives/select2/select2.js
Expand Up @@ -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();
}
}

Expand Down

0 comments on commit 1573a02

Please sign in to comment.