How to make google chrome go full screen in Angular 4 Application?

前端 未结 3 1763
小鲜肉
小鲜肉 2021-02-14 03:42

I am developing an application where I want to implement such a thing where if user leaves from one component & enters other component, then in other component\'s ngOnInit m

3条回答
  •  名媛妹妹
    2021-02-14 04:38

    You can try with requestFullscreen

    I have create a demo on Stackblitz

    fullScreen() {
        let elem = document.documentElement;
        let methodToBeInvoked = elem.requestFullscreen ||
          elem.webkitRequestFullScreen || elem['mozRequestFullscreen']
          ||
          elem['msRequestFullscreen'];
        if (methodToBeInvoked) methodToBeInvoked.call(elem);
    }
    

提交回复
热议问题