how to implement read more and readless in angular

JavaScript
<div [ngClass]="{'show-less': showShortDesciption}">
      <!-- Your Text Here -->
</div<button type="button" (click)="alterDescriptionText()">
   { showShortDesciption ? 'SHOW ALL': 'SHOW LESS' }}
 </button>.show-less {
    height: 4rem;
    overflow: hidden;
    padding: 1rem;
} showShortDesciption = true

 alterDescriptionText() {
    this.showShortDesciption = !this.showShortDesciption
 }
Source

Also in JavaScript: