PURPOSE: To minimize a change in a signal output value against a temperature change by constituting a device in such manner that the distance of a magnetic sensor to a magnetic memory medium is short when a temperature rises and is long when a temperature drops.
CONSTITUTION: In an angle detector which detects the rotary angle of a rotary axis 1, a magnetic sensor 7 is mounted on a base 6 through a support 8 at a position distant at D as prearranged from the surface of a magnetic memory medium 4 so that a magnetic sensor 7 may detect a change in a magnetic field. A signal detected by the magnetic sensor 7 is output through the intermediary of a regeneration circuit 9. The coefficient of thermal expansion of a column-shaped support 2 which supports the magnetic memory medium is selectively set higher than the coefficient of thermal expansion of the base 6. Therefore, if a temperature rises, the distance D is short and if a temperature drops, the distance D is long. Consequently it is possible to restrain a change in regenerative output resulting from a temperature change to approximately less than half, thus providing a temperature compensation effect.