Summary Table
| Categories |
Total Count |
| PII |
0 |
| URL |
0 |
| DNS |
0 |
| EKL |
0 |
| IP |
0 |
| PORT |
0 |
| VsID |
0 |
| CF |
0 |
| AI |
0 |
| VPD |
0 |
| PL |
0 |
| Other |
0 |
File Content
define(['app', 'angular', 'clampjs'], function (app, angular) {
app.directive('lineClamp', function ($sanitize) {
return {
restrict: 'AE',
require: 'ngModel',
scope: {
'lines': '=',
},
link: function(scope, elems, attrs, ngModelCtrl){
ngModelCtrl.$render = function(){
elems[0].innerHTML = $sanitize(ngModelCtrl.$viewValue);
var clampedText = $clamp(elems[0], {clamp: parseInt(scope.lines), truncationChar: "...more", useNativeClamp: false}).clamped;
if(clampedText !== undefined) {
elems[0].innerHTML = clampedText.replace(/...more$/, "<span class='clamp-truncation'>...more</span>");
}
};
}
};
});
});