In the ayat where Allah تعالى asks the angels the names of things ( الاسماء آدم علم و),كلها why did Allah تعالى ask the angels when He did not teach them, but He only taught the names to Adam السلام عليه?
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيْم
In the name of Allah, the Most Gracious, the Most Merciful
The question which Allah posed to the angels was, in fact, to make the angels understand that the human race was the best thing to create in the wisdom of Allah. When Allah told the angels he would create humans to be His representatives on the earth, the angels objected by saying they will create bloodshed (Surah Baqarah, ayah 30)
Mufti Ashiq Muhammad in his commentary on the ayah 32 explains the whole purpose of teaching Adam peace be upon him the names and not teaching the angels was to show the importance of this creation. This made a huge statement in front of the angels explaining the importance of knowledge; knowledge is one of the most important ways of being Allah’s representative on earth.
Only Allah knows best
Written by Maulana Irfan Ali
Checked and approved by Mufti Mohammed Tosir Miah
Darul Ifta Birmingham
 Anwaarul Bayaan vol 1 page 56