Compass wheel direction


I am working on compass wheel movement. Currently I am using device orientation cordova plugin for getting the magnetic heading and moving the wheel based on that magnetic heading degree, but it doesn’t give me the correct direction of any of the four.
Is there any plugin or how can I point the compass direction wheel to exact same direction?