diff --git a/dist/angular-selectize.js b/dist/angular-selectize.js index a009975..2938d7d 100755 --- a/dist/angular-selectize.js +++ b/dist/angular-selectize.js @@ -94,6 +94,15 @@ angular.module('selectize', []).value('selectizeConfig', {}).directive("selectiz scope.$watch('ngDisabled', toggle); }; + // watch for changes to attributes that are copied down to the + // input and keep them in sync + ['placeholder', 'title'].forEach(function(prop){ + scope.$watch(function() { return element.attr(prop)}, function(val) { + element.siblings('.selectize-control').find('input').attr(prop, val); + }); + }); + + element.selectize(settings); element.on('$destroy', function() {