How to detect platform using Ionic 4

前端 未结 8 1028
慢半拍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:57

    The logic used by you is the correct logic.

    The issue is with the ionic 4 and it is returning wrong values.

    Bug has been posted on ionic repo: https://github.com/ionic-team/ionic/issues/15165

    The other issue related to platform coming as ['android'] is also a bug and that has also been reported here: https://github.com/ionic-team/ionic/issues/15051

提交回复
热议问题