Merge "Watch field item changes"

This commit is contained in:
Zuul 2018-05-02 14:52:07 +00:00 committed by Gerrit Code Review
commit 6270809218

@ -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('<a>').attr('href', url).text(output));
element.replaceWith(angular.element('<a>').attr('href', url).text(output));
} else {
element.text(output);
}