@anuj14 wrote:
HI All,
I am using ionic 2 Ngfor loop and getting one list to show . Now i want to localstorage item which is based on item id on top . Like i selected no 5 previously now when i go to that number it should be shown on top of the list . How could it is possible to show that data from the list.my code is as following
<ion-item *ngFor="let company of companyDataClone; let i = index" (click)="getnext($event,company?.id)"> <p>{{company?.id}} -- {{company?.text}}</p> <ion-icon *ngIf="(i==0 &&selectedCompany && company?.id!=selectedCompany && !showApply && !localstore)" name="checkmark" item-right></ion-icon> <ion-icon *ngIf="((company?.id==selectedCompany) && (showApply || localstore))" name="checkmark" item-right></ion-icon> </ion-item>
Posts: 1
Participants: 1