@borconi wrote:
I’m having some difficulties with ionic segment and I cannot figure out what’s wrong.
I have the following segment:
<ion-segment> <ion-segment-button *ngFor="let who of options['operatives']" [value]="who.value"> {{who.label}} </ion-segment-button>
This displays the segment correctly, however here is the problem/interesting bit.
If I define the
options.operatives
locally is perfect. If theoptions.operatives
is received from a server using a http call, it does work fine, BUT the segment does not stay active after being clicked.I’m not sure how to explain better, if I feel the data array with data received from the server, the active state of the selected segment dissapears the second I release the mouse click. Copy & pasting the data returned by the http call into a local variable, everything works correctly.
Any ideas what can cause the problem?
Thanks.
Posts: 1
Participants: 1