Simple Fullscreen angularjs 2 component
To use the directive just add the FullScreenModule to your application.
Then you can add the fullscreen directive to the element you want to make fullscreen on clicking. Example for fullscreen demo
You can also add the fullScreenTarget attribute which will specify the element to be converted to fullscreen. Example for fullscreen target demo.
Can also toggle the fullscreen object based on the value of a variable using fullscreenIf directive. Example for fullscreen target demo.
Browsers provide a :fullscreen psuedo class which can be used to style a element that is currently in fullscreen mode.
We can also use fullscreen class which is attached to the element in fullscreen mode by the directive.