Did u only try on Ionic serve ?
If yes, you can probably can see that device is not defined when you check console log on your browser(F12)
and this one might help you out,
Did u only try on Ionic serve ?
If yes, you can probably can see that device is not defined when you check console log on your browser(F12)
and this one might help you out,