Does a person when saying Taslim (salutation of peace ending the Prayer) salute the angels present in the Masjid (mosque), or the angels assigned to human beings or what?
The original rule is that Taslim is meant to end Salah (Prayer), as the Prophet (peace be upon him) said in the Hadith,
The key to Salah is Taharah (ritual purification); its beginning is Takbir (saying: "Allahu Akbar [Allah is the Greatest]"); and its end is Taslim.
Related by Ahl-ul-Sunan (the compilers of Four Collections of Hadith: Abu Dawud, Ibn Majah, Al-Nasa'iy and Al-Tirmidhy).
It is also intended to salute those who offer Salah to his left and his right, as this is authentically attributed to the Prophet (peace be upon him).May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.