From 8674b5ac0128961441a4f9ad446c2b667c57f00c Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 6 Mar 2015 15:10:22 -0500 Subject: [PATCH] Angular crmUiSelect cleanup --- js/angular-crm-ui.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); } -- 2.25.1