I am using an application in Angular 14. How can I block the orientation change? I mean, I want the screen to be always displayed horizontally.
I have tried to do it this way, but it does not take the full width of the screen, keeps the width of the vertical. So the content stays in the middle of the screen. I also tried to add width: 100vw but it does not work.
@media only screen and (orientation:portrait) {
body {
height: 100vw;
transform: rotate(90deg);
}
}
I found three ways to look the device orintation
One method is to use native js enabling a full screeen view
Second method is use CSS
Third way is to alert the user to rotate the device