1.

How can you detect a platform (Android or iOS) at runtime in the Ionic application?

Answer»

Ionic provides PLATFORM CLASSES: when the application is loaded, Ionic adds CSS classes to the <BODY> tag. For example, on iOS devices, Ionic adds platform-ios class to <body> tag. Ionic also adds OS VERSION classes such as platform-ios8 (for iOS 8) and platform-android4_4 (for Android 4.4).



Discussion

No Comment Found