I found a solution:
in ts file:
visable1: boolean = false;
visable2: boolean = true;
showImage(){
this.visable1 = true;
this.visable2 = false;
}
hideImage(){
this.visable1 = false;
this.visable2 = true;
}
and in the html we will toggle between the 2 sections:
for hiding the images and showing the slider:
<div *ngIf="visable2"
for closing slider and showing images:
<section*ngIf="visable1"