There is no getting angry at the dog - they are just a dog. It is the owner that is at fault.
A couple of years ago I was out for a pleasure ride on the local MUP when along comes a guy with not one, but TWO dogs off leash. Naturally I break and prepare to stop knowing the dog is surely going to wander into my path. And if I hit him, the ignorant owner will surely blame me. The guy smiles and waves at me and I just glare at him and say "There is a LEASH LAW - you should have those dogs on a leash!" No cursing, just a good parental lecturing tone as I state the facts. At that point I've passed him (only going about 5 MPH now) and his pleasant smile suddenly turns to an ugly grimace and he starts cursing and yelling at me. Something on the order of "Who the h-ll do you think you are and if you don't like it get the f-ck off the trail". Unbelievable.
A few months ago our local newspaper columnist wrote an article about people like this. He calls them TCFAL - Too Cool For A Leash. Last night on my ride home there was a TCFAL on the MUP. At least the couple walking with the dog grabbed it when they saw me, and apologized as I rode slowly by.