(This might have happened if that kid did something to that dog in past. But I must say that dog attacked like a WILD dog, injury marks were scary!)
Normally, dogs barks/growls at you only if you make continuous eye contact with dog.
Whenever you see a dog on street, dont make eye contact for more than 1-2 second, look away (but without giving jerks!). Look away as if you have not seen it.
Dont change your walking direction or dont change your walking speed (neither slow down nor start walking faster).
Learned this trick when I was kid. And has worked ever since!