ionic-framework: Cannot select ion-segment by default
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
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 16 (1 by maintainers)
The more detailed issue/workaround/future is here https://github.com/ionic-team/ionic/issues/9374
Solved after reading this page. Disabled changeDetection
any updates on this issue?