if a dog is threatening i will get off my bike put my bike between me and the dog and tell him to go home.
If this is somewhere you go often, carry rocks (or golf balls) and throw them at the dog.
you have to change from prey to master; by standing and yelling at him he can't chase you any more.
It has also been said not to make direct eye contact with an aggressive dog, but i have done that and won, doesn't mean you will.