Reputation: 7105
I'm working a mobile application using angularjs and ionic framework.My application is for both Tab and Mobile versions. I cant use the same CSS for Tab and Mobile, so is there a way to detect the screen size and change the CSS accordingly?
I found a jquery code that does this but i'm not sure if i can use this in angularjs.If i can how?
http://www.master-script.com/detect-screen-size-with-jquery-and-apply-a-css-style.html
Can i have a step by step instructions on how to do this? Thanks in advance :)
Upvotes: 1
Views: 1302
Reputation: 1293
https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries
Hope this helps , can also use bootstrap.
Upvotes: 1
Reputation: 117
You will want to look into Media Queries. You can have sets for width or height ranges. Max width and min width. Viewports for specific devices.
Upvotes: 0