Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70919

Ionic segment not staying active

$
0
0

@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 the options.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

Read full topic


Viewing all articles
Browse latest Browse all 70919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>