How to detect the orientation change

What I was saying, was adding in the orientation plugin and accesing it through your javascript. Read the plugin docs on how to use the API, but I’m not sure I know what you mean by the “ionic code”, I’m assuming you are talking about your angular code which uses ionic specific capabilities.