Hi All,
I have 2 pages in my application and to navigate these two pages I used routerLink property.
I have segment on those two pages and one page contain user list as location wise. The location will be my segment in my first page
<ion-segment [(ngModel)]="deparmentSelSegment" class="main-tabs">
<ion-segment-button value="SA">
<ion-label>South africa</ion-label>
</ion-segment-button>
<ion-segment-button value="India">
<ion-label>India</ion-label>
</ion-segment-button>
</ion-segment>
On 2nd page i have user details divided in segments
` <ion-segment id="userProfileSeg" class="main-tabs" scrollable [(ngModel)]="userData" #Content>
<ion-segment-button value="0" checked layout="icon-start" id="segment0">
<ion-label> Profile</ion-label>
</ion-segment-button>
<ion-segment-button value="1" layout="icon-start" id="segment1">
<ion-label> Rewards</ion-label>
</ion-segment-button>
<ion-segment-button value="2" layout="icon-start" id="segment2">
<ion-label> Questions Asked</ion-label>
</ion-segment-button>
<ion-segment-button value="3" layout="icon-start" id="segment3">
<ion-label> Reactions </ion-label>
</ion-segment-button>
<ion-segment-button value="4" layout="icon-start" id="segment4" *ngIf="userDetails?.isAdmin =='true' || userDetails?.isQAAdmin == 'true' && userDetailsData?.userId == userDetails?.userId ">
<ion-label> My Broadcasts</ion-label>
</ion-segment-button>
</ion-segment>`
When i changed my location for SA to India on first page and then click on any user It redirects to User profile page and when I changed tab in user profile ngModel value on first page becomes blank.
I dont have any idea why this is happening.Any help would be appriciated.
Regards,
Swanand