JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="testapp" ng-controller="testctrl">
<div class="content" ng-class="{ less: hidden }">
Now is the time for all good men to come to the aid of the party.
Now is the time for all good men to come to the aid of the party.
Now is the time for all good men to come to the aid of the party.
Now is the time for all good men to come to the aid of the party.
</div>
<button ng-click="hidden = !hidden">{{hidden ? 'Show' : 'Hide'}}</button>
</div>
CSS
.content {
width: 240px;
overflow: hidden;
word-wrap: break-word;
text-overflow: ellipsis;
line-height: 18px;
}
.less {
max-height: 54px;
}
JavaScript
var app = angular.module('testapp', []);
app.controller('testctrl', function ($scope) {
$scope.hidden = true;
});