Skip to content

Commit 95f092d

Browse files
committed
setTimeout was swapped of AngularJS
1 parent 58b2b16 commit 95f092d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

angular-chosen.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
(function (angular) {
77
var AngularChosen = angular.module('angular.chosen', []);
88

9-
AngularChosen.directive('chosen', function () {
9+
AngularChosen.directive('chosen', ['$timeout', function ($timeout) {
1010
var EVENTS, scope, linker, watchCollection;
1111

1212
/*
@@ -78,7 +78,7 @@
7878
});
7979

8080
$scope.$watchGroup(watchCollection, function () {
81-
setTimeout(function () {
81+
$timeout(function () {
8282
iElm.trigger('chosen:updated');
8383
}, 100);
8484
});
@@ -104,5 +104,5 @@
104104
restrict: 'A',
105105
link: linker
106106
};
107-
});
107+
}]);
108108
}(angular));

0 commit comments

Comments
 (0)