How to detect platform using Ionic 4

前端 未结 8 1180
慢半拍i
慢半拍i 2021-02-09 08:24

How to detect browser and mobileweb platform using Ionic 4 because when I tried with below code in desktop browser it is not falling in ‘core’ condition.

<
8条回答
  •  半阙折子戏
    2021-02-09 08:47

    Ionic-4 Platform specific value

    goto- node_modules@ionic\angular\dist\providers\platform.d.ts

         Platform Name   | Description                        |
     * | android         | on a device running Android.       |
     * | cordova         | on a device running Cordova.       |
     * | ios             | on a device running iOS.           |
     * | ipad            | on an iPad device.                 |
     * | iphone          | on an iPhone device.               |
     * | phablet         | on a phablet device.               |
     * | tablet          | on a tablet device.                |
     * | electron        | in Electron on a desktop device.   |
     * | pwa             | as a PWA app.                      |
     * | mobile          | on a mobile device.                |
     * | desktop         | on a desktop device.               |
     * | hybrid          | is a cordova or capacitor app.     |
    

提交回复
热议问题