I am just a bit confused here with the absence of an accurate description of the site of the pain.
Front of the ankle...do you mean the top of the foot?
I also will assume that there is one swelling or redness and you have already mentioned that trauma is not part of the picture.
With relief that you describe with changing the type of shoe, then it does sound very much like..Extensor Tendonitis.......Google it.
The treatment involves my good friend Ibuprofen and it should settle within a couple of weeks.