How to restrict screen orientation on single page in ionic4

I have tried will all the commands given by ionic framework docs . if i uses in single page also it is effecting in trough out the application

Can try this one
this.platform.ready().then(() => {
this.screenOrientation.unlock();
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.LANDSCAPE);
});

2 Likes

In the config.xml if you are using Cordova

Preference “Orientation”
Cordova docs - config.xml

yes.But it is reflecting for all the pages i need for only specific page

No this work in single page only. recently i am implemented only single screen.

Thank you lakshman .One more thing on the particular screen if i tilt mobile from portrait mode to it should go to land scape mode.if you know can you help me