I have an ngFor for some content, I want to show only items in a single line rest items should be hidden and the card should expand on clicking show more.
fruits= [apple, orange, grapes, banana, strawberry, pineapple, watermelon, kiwi, avocado, papaya ]
<div class="more">show more</div>
<div class="less">show less</div>
<ul>
<li *ngfor = let list of fruits>{{list}}</li>
</ul>
here in the list i want to show only first 3 rest should be hidden and on clicking show more it should show.