0

Using videogular component i am trying to figure out a way how to hide my navbar when the vgControls are hidden using vgAutohide.

    <vg-controls [vgAutohide]="true" [vgAutohideTime]="1.5">

Is there any easy way how to listen to this change?

I was trying to get the information from VgControlsHiddenService but was not successfull

      console.log(this.controlsHidden.isHidden.subscribe(this.onHideControls.bind(this)));

1 Answers1

0

try to use this logic

<vg-controls #ref [vgAutohide]="true" [vgAutohideTime]="1.5">

in ts file :

 hide=false //show hide the navbar

@ViewChild('ref') ref

ngAfterViewInit(){

//get the value from ref 
//this.hide =true or what you want

}
Chady BAGHDADI
  • 203
  • 2
  • 7