Skip to content

Instantly share code, notes, and snippets.

@royts
Created June 30, 2013 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save royts/5894780 to your computer and use it in GitHub Desktop.
Save royts/5894780 to your computer and use it in GitHub Desktop.
Small changes in @simpulton chosen.js deirective for AngularJS (https://github.com/simpulton/angular-chosen)
module.directive('angularChosen', function () {
return {
restrict: 'A',
require: '?ngModel',
link: function (scope, element, attrs) {
scope.$watch(attrs.ngModel, function () {
element.trigger('liszt:updated');
});
element.chosen();
}
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment