diff --git a/src/js/index.js b/src/js/index.js index 442451a07..65e804203 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -581,7 +581,8 @@ app.directive('tagInput', function () { scope: { inputTags: '=taglist' }, - link: function ($scope, element, attrs) { + require: '^form', + link: function ($scope, element, attrs, formCtrl) { $scope.defaultWidth = 200; $scope.tagText = ''; // current tag being edited $scope.placeholder = attrs.placeholder; @@ -613,6 +614,7 @@ app.directive('tagInput', function () { tagArray.splice(key, 1); } } + formCtrl.$setDirty(); return $scope.inputTags = tagArray.join(','); }; $scope.$watch('tagText', function (newVal, oldVal) {