Customizing themes for specific platforms
Each mobile platform vendor has its own design guideline. This recipe will go over an example of how to address the app theme differently for iOS and Android. In traditional development, using either a native language or other hybrid app solutions, you have to keep separate repositories for each platform in order to customize the theme. This can be very inefficient in the long run.
Ionic makes it very convenient by separating the stylesheet for each platform and specific OS version within the same platform. The example in this recipe covers two possibilities of customization using Sass and JavaScript. The following screenshot shows both the iOS and Android app with different title bar colors and text:
Getting ready
There is no need to test the theme on a physical device because Ionic can render both iOS and Android in the browser.
How to do it...
Here are the instructions to customize themes for specific platforms:
- Create a new app using the blank template...