Children should be taught to not approach or attempt to pet strange dogs. As there will never likely be a law which can effectively prohibit idiots from owning dogs, dog attacks can and will happen. Avoid eye contact with an aggressive dog. If you are jogging, stop jogging and walk by the dog, avoiding eye contact and sudden movement. Avoid the temptation to rebuke the owner of an aggressive dog for allowing their menacing and unleashed dog to remain in your direct path.
Aggressive dogs are often a reflection of their owner's character.
If you notice the aggressive dog unleashed again, contact the police with a good description of the dog, the owner and time of day. Try to remember the dog's name if it was called during your presence. Do not raise your hands in a fight stance prematurely as this may antagonize the dog and you might lose your one chance at stopping the attacking dog through commands. If the dog is small and presents no danger for your neck area, you may want to try to kick it. A good blow to the nose or to the body will stop most small dogs.