I'm trying to show and hide the play and pause button, when the play button is pressed, I need to hide the pause button and vice versa. I tried like this
<ion-content padding> <button ion-button *ngIf="status" name="play" (click)="itemSelected()" >Play</button> <button ion-button *ngIf="!status" name="square" (click)="stopPlayback()" >stop</button> </ion-content> import { Component } from '@angular/core'; import { NavController, NavParams, AlertController } from 'ionic-angular'; @Component({ selector: 'page-login', templateUrl: 'login.html' }) export class LoginPage { status: boolean = false; constructor(public navCtrl: NavController, public alertCtrl: AlertController, public navParams: NavParams,) { } ionViewDidLoad() { console.log('ionViewDidLoad LoginPage'); } itemSelected(){ this.status = true } stopPlayback(){ console.log("stop"); this.status = false } }
can someone help me solve this problem, thanks in advance

angular ionic2
Yokesh varadhan
source share