I'm currently working on a paragraph that adjusts its length based on the maximum height. I'm interested in finding a way to display or hide the anchor element if the height exceeds a specific limit. Essentially, I only want to show "more..." when necessary.
$scope.hidden = true;
.__Description {
overflow: hidden;
word-wrap: break-word;
text-overflow: ellipsis;
}
.less {
max-height: 160px;
}
<div class="__Description">
<div class="__contents" ng-class="{less: hidden}">
<div data-ng-bind-html="program.Description"></div>
</div>
</div>
<a ng-click="hidden = !hidden">{{hidden? 'More...' : 'Less...'}}</a>