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
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);
}