Skip to content

Cannot select ion-segment by default #11743

@ix-xerri

Description

@ix-xerri

Ionic version: (check one with "x")
[ ] 1.x (For Ionic 1.x issues, please use https://github.com/driftyco/ionic-v1)
[ ] 2.x
[x] 3.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

I'm trying to select an ion-segment by default and it's not preselecting.

this is the code I have in the html

<div [ngSwitch]="gmap"> <ion-list *ngSwitchCase="'showMap'"> </ion-list>

and in the component I have a simple gmap: string; and this.gmap = "showMap";. The tabs work as intended but I cannot preselect a segment by default. This use to work in Ionic2 but doesn't work when upgrading to Ionic3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions