Google News
logo
Ionic - Interview Questions
In an Ionic application, how do you identify a platform (iOS or Android) at runtime?
Ionic offers a platform service for obtaining information regarding the current device.
 
* All of the platforms linked with the device are returned by the platform method.

* It also indicates if the application is being seen on a tablet, mobile device, or browser, as well as the platform used, such as Android or iOS.

* Ionic applies CSS classes to the <body> tag when the application is loaded on the device. Ionic, for example, adds the platform-ios class to the <body> tag on iOS devices.
Advertisement