24 In this passage the one Deity is first the Angel of God, and then, successively, Lord and God. But to Abraham He is God only. For when the distinction of Persons had first been made, as a safeguard against the delusion that God is a solitary Being, then His true and unqualified name could safely be uttered. And so it is written. And God said to Abraham, Behold Sarah your wife shall bear you a son, and you shall call his name Isaac; and I will establish My covenant with him for an everlasting covenant, and with his seed after him.
And as far Ishmael, behold. I have heard you and have blessed him, and will multiply him exceedingly; twelve nations shall he beget, and I will make him a great nation. Is it possible to doubt that He Who was previously called the Angel of God is here, in the sequel, spoken of as God? In both instances He is speaking of Ishmael; in both it is the same Person Who shall multiply him. To save us from supposing that this was a different Speaker from Him who had addressed Hagar, the Divine words expressly attest the identity, saying, And I have blessed him, and will multiply him.
The blessing is repeated from a former occasion, for Hagar had already been addressed; the multiplication is promised for a future day, for this is God's first word to Abraham concerning Ishmael. Now it is God Who speaks to Abraham; to Hagar the Angel of God had spoken. Thus God and the Angel of God are One; He Who is the Angel of God is also God the Son of God. He is called the Angel because He is the Angel of great counsel; but afterwards He is spoken of as God, lest we should suppose that He Who is God is only an angel. Let us now repeat the facts in order. The Angel of the Lord spoke to Hagar; He spoke also to Abraham as God. One Speaker addressed both. The blessing was given to Ishmael, and the promise that he should grow into a great people.
Source: On the Trinity (New Advent)