Screen width and height is wrong

I’m trying to get the width and height of mobile phones in my Ionic app using platform.width() and platform.height().

Testing it with a One Plus One (1080x1920 pixels), it gives me 360x640.
Visiting this website with the phone gives the same values.

What’s going on here? How could I get the right width and height?

ipad air2 has 1024x768 instead 2048x1536
Samsung Note N915F 616x383 instead 2560 x 1440

if ipad has just scaled 2 times with same ratio,
samsung has wrong ratio and strange scale