Select Styling based on device orientation


#1

In my Ionic 2 app I have pages which contain an image and a block of text. When landscapel I want the image on the right and the text on the left. When the device is portrait I want the image at the top and the text at the bottom.

What is the best way to do this? I imagine putting the image and text in

tags, where the class is dependent on orientation. Is that possible?

Thanks for any hints.


#2

So I have solved the first problem - how to assign different styles in code. See

http://houssein.me/javascript/angular2/2016/05/29/event-and-style-binding-in-angular2.html

Now I just have to work out when up is up and not left!