The correct device to measure angle is called a rotary encoder. There are two kinds, absolute, or incremental. Incremental encoders output the increment of angle on the shaft, and used to measure angular motion. Absolute encoder output the actual position on the shaft, and are used to measure absolute angle.
A pot can be used for this, but only if you do not need a lot of precision. Pot resistances have thermal drift, resistance also drifts with wear, they get dirty, etc. Just a pot and a lookup table would need constant recalibration, unless you only want to know if a hinge is opened or closed. If that is the case, a simple pushbutton with an appropriate length shaft will work just fine. If you need to actually measure the angle, use a rotary encoder.