Making Div visible after specyfic action

Hi,
I have got div, thats visibility is set to “hidden”

html:

 <div class="sroda">
 <button (click)="skip()" id="skip">
  {{skipMsg}}
</button>
</div>

scss:

.sroda{
position: absolute;
z-index: 1;
width:89%;
text-align: center;
visibility: hidden;
}

skipMsg is changing when slides ends

html:

<ion-slides pager (ionSlideDidChange)="slideChanged()" (ionSlideDrag)="slideMoved()">

ts:

skipMsg: string = "Skip";
 slideChanged() {
    if (this.slides.isEnd())
      this.skipMsg = "Changed";
  }

How can I use slideChanged() to change div visibility to visible?

Do you need to have the div rendered invisible?

You can use *ngIf=" theCondition " on your div.

1 Like

Or [hidden]=“shouldHide”>