I have a list of 4 items, the first 2 visible and the last 2 hidden. And a "show more / less" button that toggles the visibility of the last 2 items.
<ol>
<li *ngFor="let errorList of errorItems | slice: 0:count">
<p>{{ errorList }}</p>
</li>
</ol>
<p *ngIf="errorItems.length > 2" (click)="viewMoreClicked()">view more details</p>
I need view more and view less