A walk goes a long way. It is the perfect start to engage well with your dog. And it also means that you can be on a common ground to start initiating training while always giving the care and affection he/she needs.
You might wonder why your dog is angrily barking towards another dog, it is likely to be out of fear because he/she is feeling nervously scared. It could also be out of excitement as he/she wishes to befriend the other dog/s. This can be changed through rewarding him/her as soon as he/she sees the other dog/s, and by stopping the reward when the barking starts. Stay or move further away until he/she can be safer to his/her standards. You can then try to reduce the distance so as long as he/she remains feeling secure.
In situations such as going for a walk and losing your dog’s focus, it is important that you get him/her to pay attention to you by retaining distance in the initial stages until he/she starts to feel more relaxed to approach the other dog/s.