Hello
In ionic v4 i need to use the platform’s resize event.
After the platform ready event i have subscribed the resize event.When the device orientation changed/screen size resized i want the event to fire.
import { Platform } from '@ionic/angular';
constructor(public platform:Platform){
this.InitiatePlatformIfReady();
}
InitiatePlatformIfReady() {
this.platform.ready().then(() => {
console.log('before subscribe');
this.platform.resize.subscribe(() => {
console.log('resized');
});
});
}
The above code works fine in v3 but it doesn’t work as expected in v4.
Somebody please tell me how can i subscribe platform resize event ionic v4.