ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51.07k stars 13.51k forks source link

Ionic platform check not working properly #12472

Closed sundaramoorthyjeeva closed 7 years ago

sundaramoorthyjeeva commented 7 years ago

Platforms android - on a device running Android. cordova - on a device running Cordova. core - on a desktop device. ios - on a device running iOS. ipad - on an iPad device. iphone - on an iPhone device. mobile - on a mobile device. mobileweb - in a browser on a mobile device. phablet - on a phablet device. tablet - on a tablet device. windows - on a device running Windows.

Code if (this.platform.is('core') || this.platform.is('mobileweb')) { // login page }else{ // Home page }

Issue This above conditional block not satisfied in mobile browser. Actually "mobileweb" platform indicates the browser on a mobile device. But condition not satisfied. Whats wring with this or API issues ? How to resolve ? Help please.

jgw96 commented 7 years ago

Hello, thanks for opening an issue with us. What browser are you having issues with? Also, could you post a repo we could use to reproduce this issue?

jgw96 commented 7 years ago

Hello! As it seems it has been a while since there was any activity on this issue i will be closing it for now. Feel free to comment if you are still running into this issue. Thanks for using Ionic!

sundaramoorthyjeeva commented 7 years ago

Sorry for the delay reply. Yes. I am using chrome browser. Still I am facing this issue. Platform "mobileweb" returns false. What to do ?

karansharma27 commented 7 years ago

I am facing the same issue, what's the solution?

ionitron-bot[bot] commented 6 years ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.