Como implementar Leia mais e sem leitores em Angular
<div [ngClass]="{'show-less': showShortDesciption}">
<!-- Your Text Here -->
</div
Clumsy Chamois
<div [ngClass]="{'show-less': showShortDesciption}">
<!-- Your Text Here -->
</div
showShortDesciption = true
alterDescriptionText() {
this.showShortDesciption = !this.showShortDesciption
}
.show-less {
height: 4rem;
overflow: hidden;
padding: 1rem;
}
<button type="button" (click)="alterDescriptionText()">
{ showShortDesciption ? 'SHOW ALL': 'SHOW LESS' }}
</button>