How do you know when your friend get angry on you? You can feel the tone of his voice or if you both are chatting online, you can observe the writing tone as well.
If he says that I won’t talk to you, you should ask for the reason. He will never stay back for long and definitely will come back again to the same friendly time. But give him some time just to stay as he wants. Don’t try to pull him hard towards you by excusing or doing this and that. Those tactics never work in such situations.
After a few days, when he comes back, talk to him in short language. Talking short in your conversation gives the impression that you feel the anguish, you accept the anger, and you still don’t want to loose your friend for any reason.
Things will be fine between the two of you sooner or later. Just try this out.