Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

ion-segment doesn't refresh for hiding div <div *ngIf="isActive"> #1536

Open
MInesGomes opened this issue Aug 26, 2019 · 1 comment
Open

Comments

@MInesGomes
Copy link

MInesGomes commented Aug 26, 2019

Short description of the problem:

In .html I have a segment

<ion-segment small [(ngModel)]="isActive" (ionChange)="loadActive($event)">
       <ion-segment-button small value=true>
           <ion-label>Active</ion-label>
       </ion-segment-button>
       <ion-segment-button small value=false>
           <ion-label>Inactive</ion-label>
       </ion-segment-button>
   </ion-segment>

and simple code to show or hide just to test.

   {{isActive}}
    <div *ngIf='!isActive'>
        hello not active
    </div>

    <div *ngIf='isActive'>
        hello yes
    </div>

result is:

for tab active:

true
hello yes

for tab inactive:

false
hello yes

What behavior are you expecting?

for tab inactive should be :

false
hello not active

ionic info

Ionic:

Ionic CLI : 5.2.6 (/Users/mirg/.nvm/versions/node/v10.14.2/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.6.2
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1

Cordova:

Cordova CLI : 8.1.2 ([email protected])
Cordova Platforms : browser 5.0.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 12 other plugins)

Utility:

cordova-res : not installed
native-run : 0.2.2 (update available: 0.2.8)

System:

NodeJS : v10.14.2 (/Users/mirg/.nvm/versions/node/v10.14.2/bin/node)
npm : 6.10.2
OS : macOS Mojave
Xcode : Xcode 10.3 Build version 10G8

@MInesGomes MInesGomes changed the title ion-segment doesn't refresh for hiding dive <div *ngIf="isActive"> ion-segment doesn't refresh for hiding div <div *ngIf="isActive"> Aug 26, 2019
@StefanRein
Copy link
Contributor

Hello,

this is the wrong repository for your request. This is a library for Ionic 3, which has build scripts for ionic 3 apps. This here is the correct repository for your request: https://github.com/ionic-team/ionic

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants