diff --git a/src/uiSelectDirective.js b/src/uiSelectDirective.js index 4be1ff34c..3f5bbffc8 100644 --- a/src/uiSelectDirective.js +++ b/src/uiSelectDirective.js @@ -17,6 +17,14 @@ uis.directive('uiSelect', controllerAs: '$select', compile: function(tElement, tAttrs) { + // Allow setting ngClass on uiSelect + var match = /{(.*)}\s*{(.*)}/.exec(tAttrs.ngClass); + if(match) { + var combined = '{'+ match[1] +', '+ match[2] +'}'; + tAttrs.ngClass = combined; + tElement.attr('ng-class', combined); + } + //Multiple or Single depending if multiple attribute presence if (angular.isDefined(tAttrs.multiple)) tElement.append('').removeAttr('multiple');