Q:

how to implement read more and readless in angular

.show-less {
    height: 4rem;
    overflow: hidden;
    padding: 1rem;
}
0
<div [ngClass]="{'show-less': showShortDesciption}">
      <!-- Your Text Here -->
</div
0
 showShortDesciption = true

 alterDescriptionText() {
    this.showShortDesciption = !this.showShortDesciption
 }
0
<button type="button" (click)="alterDescriptionText()">
   { showShortDesciption ? 'SHOW ALL': 'SHOW LESS' }}
 </button>
0

New to Communities?

Join the community