Show only on Android devices


#1

Hello,

I have entries in my template file, which i want only show, when the app run on Android devices, not on iOS.
Is it possible to hide them, when the app runs on iOS ?


#2

When running on android it adds a class called “platform-android” to the top body tag i believe, you can use some css with that to hide/show things on different platforms.

Alternatively there is the ionic.Platform utility class, you can call the isAndroid functions on that, perhaps stick an is_android variable on $rootScope from within an app.run block and use and use ng-show/hides if you want access to it in all your template files.


#3

Thx, works with the class platform-andorid.