SmartIT_Extensions/BMC/smart-it-full-helix/scripts/app/common/character-limit-message-dir...

23 lines
677 B
JavaScript

"use strict";
(function () {
'use strict';
angular.module('myitsmApp')
.directive('characterLimitMessage', function () {
return {
restrict: 'E',
templateUrl: 'views/common/character-limit-message-directive.html',
scope: {
field: '='
},
link: function (scope, element, attr) {
scope.$watch('field', function () {
if (scope.field == undefined) {
scope.field = '';
}
});
scope.limit = attr.limit ? parseInt(attr.limit, 10) : '';
}
};
});
}());