How to use the new Device Orientation

In this the repo where the device orientation plugin is it says it’s deprecated and to use something else: https://github.com/apache/cordova-plugin-device-orientation

And this is a tutorial from Apache about how to access the compass but I don’t seem to be able to get it working: https://blog.phonegap.com/migrating-from-the-cordova-device-orientation-plugin-8442b869e6cc

Could someone give me a hand on implementing this in Ionic?

Thanks.