Simple function with Toogle menu


#1

Hi everyone,
I would like to use toogle menu to show a text while enable, or hide it when it comes disable. My intention is change idioms by this way. Please, help me with a script! And If this function could be applied for all pages from just one (whats going to be my SettingsPage), it would be very nice!!!

thank you guys
Beginner programmer


#2
<ion-toggle (ionChange)="onChangeToggle()" ng-model="someModel">
   
</ion-toggle>

<ion-input *ngIf="togglechecked"  type="text" value=""></ion-input>

in app.compoenent.ts file:

 public togglechecked: boolean = false; //Whatever you want to initialise it as

    public onChangeToggle() {

        this.togglechecked= !this.togglechecked;
    }