I have function in component.ts like below
visability=true;
showTextBox(){
debugger;
this.visability = false;
}
and in component.html below code I have
<div class="col-sm">
<div class="toggle">
<input type="checkbox" class="check">
<!-- (click)="show=!show" -->
<b class="b switch" ></b>
<b class="b track"></b>
</div>
<h4 id="door-delivery">Door Delivery</h4>
</div>
<div class="col-sm address">
<div *ngIf="!visability" (click)="showTextBox()">
<input class="form-control " type="text" placeholder="Enter Address">
</div>
<div *ngIf="visability" (click)="showTextBox()">
<select formControlName="pickup_location" class="form-control selectpicker" id="select-city" data-live-search="true" required>
<option data-tokens="" disabled>
<h2>Pickup location...</h2>
</option>
<option data-tokens="India">
<h2>India</h2>
</option>
<option data-tokens="UAE">
<h2>UAE</h2>
</option>
<option data-tokens="Japan">
<h2>Japan</h2>
</option>
</select>
</div>
</div>
My Toggle Looks like My Question is when I click on toggle it should appear Enter pickup location and as well as again if I click on toggle it should be display the list of cities.
How we can achieve this? could any one help me
!operator.visibility = !visibility