diff --git a/horizon/static/framework/widgets/property/hz-field.directive.js b/horizon/static/framework/widgets/property/hz-field.directive.js index cd48e84b3b..6b5bf63a23 100644 --- a/horizon/static/framework/widgets/property/hz-field.directive.js +++ b/horizon/static/framework/widgets/property/hz-field.directive.js @@ -107,6 +107,12 @@ /////////////////// function link(scope, element) { + scope.$watch('item', function() { + filterItem(scope, element); + }); + } + + function filterItem(scope, element) { var config = scope.config; var item = scope.item; var propValue = item[config.id]; @@ -131,7 +137,7 @@ } if (url) { - element.append(angular.element('').attr('href', url).text(output)); + element.replaceWith(angular.element('').attr('href', url).text(output)); } else { element.text(output); }