Pain in any leg joint (hip, knee or ankle) can be caused by a problem with that or any other leg joint.
In the case of the ankle, a knee injury
can change the angle at which the knee works, putting stress
on the ankle and causing pain.
Answer assisted by David Miller, Medical Student