Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] ionic serve --platform="android" #314

Closed
kurtommy opened this issue Mar 18, 2015 · 11 comments
Closed

[Request] ionic serve --platform="android" #314

kurtommy opened this issue Mar 18, 2015 · 11 comments

Comments

@kurtommy
Copy link

Add the flag for decide wich type of platform to load on browser, ios, android etc

@jbavari jbavari self-assigned this Mar 19, 2015
@jbavari
Copy link

jbavari commented Mar 19, 2015

I like this suggestion. I'll look at adding it soon. Thanks.

@markbeekman
Copy link

+1

I would really like this feature! I'm working on a smartphone and tablet app with Ionic with specific iOS and Android styles. To style these specific elements it would be nice to serve as Android.

Another option I would like is to serve lab and I could change the frame size from smartphone to smartphone landscape en tablet portrait + landscape. Now I have to change the iframe size with my Firebug.

Thanks!

@djskinner
Copy link

+1 all day long. Was looking for how to do this and assumed it would already exist.

@AMar4enko
Copy link

Why do you need to serve for special platform, if you can simply switch platform in browser?
You can switch your platform to iPhone, iPad, Blackberry, whatever using Developer Tools in Chrome, for example, and then ionic app will have appropriate styles applied to body, as well as app viewport will match selected device screen size.

If you confused with platform classes, which added during app build, here is a notice in add_platform_class.js

// Add Platform Class
// v1.0
// Automatically adds the platform class to the body tag
// after the `prepare` command. By placing the platform CSS classes
// directly in the HTML built for the platform, it speeds up
// rendering the correct layout/style for the specific platform
// instead of waiting for the JS to figure out the correct classes.

It just helps to speedup layout rendering with embedding necessary classes.

@kurtommy
Copy link
Author

kurtommy commented Apr 7, 2015

Hi @AlexYankee changing the emulator device was the first things that i try, but for me it change only the screen size but not the style, can you post a short video tutorial for this or some hints? Thank you

@AMar4enko
Copy link

@kurtommy you probably missed a small notice in the status bar about need to reload page after device change in chrome. Try it one more time, but do Ctrl+R after device type changed.

@kurtommy
Copy link
Author

kurtommy commented Apr 7, 2015

I done refresh! but nothing happen!

Tommaso Rossi

Contacts:
Skype: kurtommyk
Mobile: 3393000359

Website:
www.rossitommaso.it

Short CV:

  • Linkedin: http://goo.gl/YaokpB
  • Hibryd App: Ionicframework
  • FE: Angular js | Grunt | Bower | Jasmine | Karma | Protractor | HTML5 | CSS3
  • BE: Laravel 5 | cakephp | Symfony | Yii

Rispetta l’ambiente. Hai davvero bisogno di stampare questa mail?
Please consider the environment – Do you really need to print this email?

Informativa Privacy - Ai sensi del D. Lgs n. 196/2003 (Codice Privacy) si precisa che le informazioni contenute in questo messaggio sono riservate e ad uso esclusivo del destinatario. Qualora il messaggio in parola Le fosse pervenuto per errore, La preghiamo di eliminarlo senza copiarlo e di non inoltrarlo a terzi, dandocene gentilmente comunicazione. Grazie.

Privacy Information - This message, for the D. Lgs n. 196/2003 (Privacy Code), may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation.

Il giorno 07/apr/2015, alle ore 15:13, AlexYankee notifications@github.com ha scritto:

@kurtommy https://github.com/kurtommy you probably missed a small notice in the status bar about page reload after device change in chrome. Try it one more time, but do Ctrl+R after device type changed.


Reply to this email directly or view it on GitHub #314 (comment).

@AMar4enko
Copy link

@kurtommy hmm, what browser it was? Chrome? Write me in Skype - aimar4enko, i can do screen share of my browser working perfectly.

@jbavari
Copy link

jbavari commented May 15, 2015

Hello,

This feature is out in 1.4.2 - ionic serve --platform android

@jbavari jbavari closed this as completed May 15, 2015
@VinceOPS
Copy link

Hi, not working here. My body keeps the platform-ios class and other IOS related css classes.

However, I can go to localhost:8100/ionic-lab to see both platforms.

@kamok
Copy link

kamok commented Feb 1, 2017

@VinceOPS I figured out why my app wasn't doing ionic serve --platform ios/android properly. You might be using Ionic App Scripts. I simply went into my package.json and deleted the line:

"ionic:serve": "ionic-app-scripts serve",. Now I can run my ionic serve --options. I don't know if this is a bug, or if it's working as intended. But that's what worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants