Default
Adds tooltip when text is truncated
- HTML
<div class="t-content" style="width:300px; height: 100px;" ng-controller="smartTruncateExampleController as Ctrl"> <div ng-bind="Ctrl.text" smart-truncate></div> </div>
<div class="t-content" style="width:300px; height: 100px;" ng-controller="smartTruncateExampleController as Ctrl"> <div ng-bind="Ctrl.text" smart-truncate></div> </div>
Regular Text
Regular Text (Default: Shows full text)
Regular Text (Smaller text doesn't show Less/More link)
Regular Text (Multi-line text)
<div class="t-content" ng-controller="smartTruncateExampleController as Ctrl"> <p> <strong>Regular Text</strong> </p> <div ng-bind="Ctrl.text" smart-truncate allow-read-more="true" char-count="50"></div> <p> <strong>Regular Text (Default: Shows full text)</strong> </p> <div ng-bind="Ctrl.text" smart-truncate allow-read-more="true" char-count="50" initial-state-expanded="true"></div> <p> <strong>Regular Text (Smaller text doesn't show Less/More link)</strong> </p> <div ng-bind="Ctrl.text" smart-truncate allow-read-more="true" char-count="1000"></div> <p> <strong>Regular Text (Multi-line text)</strong> </p> <div style="width: 300px;"> <div ng-bind="Ctrl.text" smart-truncate allow-read-more="true" char-count="100"></div> </div> </div>