I have build sample application using ionic framework. I want to run this application in desktop browsers only but it shows like android device layout same like this application : http://ionicmaterial.com/demo/
Right now for local testing and running I am using this command and it shows both layout ios and android. I am using this command : “ionic serve -l”. If i will not give option -l then it shows in whole page. I want to load my application looks like this only http://ionicmaterial.com/demo/
Which configuration I need set. Can anybody please help me to solve this problem?
i would give you the advice not to use ionic for a web-app.
I tried it for a production project in the past. and you will run into usability issues on the different browsers you need to hack around.
Mostly I have done code. Its hard to move now on angularjs which you suggested above in your comment?
Please give me as of now solution, how can I show my application for android browser only. Its simple study demo application. It would not be production url for more than 100 people. So I dnt want to change a lot of things.
in the demo… there is no cordova running in the background.
you can open your app in browser without cordova (no native apis available).
the demo pages loads the external app in an iframe and set the height and size to simulate phone handling.
Are you trying to have it display in a browser only Android or make it an app on Android? If you want to use it on Android, just make an app instead of making it a web app. Ionic uses Angular so you shouldn’t be changing much of your code.
Thanks for reply. I have created whole application. Is this change will effect my application functionality and all. Yes I want to show my application in iFrame of other webpage. Is this possible?
sry but i do not understand want you want exactly… are you showing your app on a desktop browser but in android style… or do you want to run it on android in a browser or as an android app.
Add platform-android on your body tag, that will display the application as if it was android regardless of whether they are on android or not.
@skpatel you need to frame your questions better and understand that Ionic is not intended for the web, if not for this application then for your next one you shouldn’t use Ionic if it’s purely for the desktop web browser.
You will NOT be able to access any cordova plugins from the web browser.
Thanks for your reply, But I want to make application as like android which should be run in browser not in mobile devices. When I started this application at that time i thought ionic framework gives me what I want. This demo application creates positive impression in my mind.
It will give me same android application type look in desktop browser? Forget about material design. I want to make that layout type web application which looks like android application. (I said as like demo application. I do not want material design as of now.)
Thanks for your reply. So you mean that " ionicmaterial.com demo" is running in iFrame?
If yes then I want the same thing.
I was thinking that ionicmaterial.com demo is running in that way so I can feel its android application look and feel in desktop browser.
Sorry for misunderstood the way “ionicmaterial.com demo” is working. Is it possible to run my application same like ionicmaterial.com demo application with iFrame?
I appreciate your efforts and thanks for helping me.