From: Coleman Watts Date: Fri, 6 Mar 2015 20:10:22 +0000 (-0500) Subject: Angular crmUiSelect cleanup X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8674b5ac0128961441a4f9ad446c2b667c57f00c;p=civicrm-core.git Angular crmUiSelect cleanup --- diff --git a/js/angular-crm-ui.js b/js/angular-crm-ui.js index b810b39fce..be4fb45a3d 100644 --- a/js/angular-crm-ui.js +++ b/js/angular-crm-ui.js @@ -499,7 +499,7 @@ return { require: '?ngModel', scope: { - crmUiSelect: '@' + crmUiSelect: '=' }, link: function (scope, element, attrs, ngModel) { // In cases where UI initiates update, there may be an extra @@ -523,8 +523,7 @@ function init() { // TODO watch select2-options - var options = attrs.crmUiSelect ? scope.$parent.$eval(attrs.crmUiSelect) : {}; - element.select2(options); + element.select2(scope.crmUiSelect || {}); element.on('change', refreshModel); $timeout(ngModel.$render); }