He said, No; but [as] prince of the host of Yahweh am I now come. Joshua fell on his face to the earth, and did worship, and said to him, What says my lord to his servant?
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).