It happened, when Joshua was by Jericho, that he lifted up his eyes and looked, and, behold, there stood a man over against him with his sword drawn in his hand: and Joshua went to him, and said to him, Are you for us, or for our adversaries?
One could also cite God’s visit to Abraham at the oaks of Mamre (Genesis 18) and Jesus’ self-revelation to the two disciples on the way to Emmaus (Luke 24:13-35), though these were not life threatening encounters. Joshua would hardly have submitted as he did if he had not believed that this Man was the Angel of the Lord (cf. Exodus 3:5; Numbers 22:31).