If the dog is following and remaining aggressive, then look for something you can get behind, such as a wall or door, and slowly back away towards it.Another tip is to have something you can give to the dog, such as some food in your bag, your bag itself or a jacket.