Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:43:19

And they have made the angels, who are servants of the Most Merciful, females. Did they witness their creation? Their testimony will be recorded, and they will be questioned.  

And they have made the angels, who are themselves servants of the Compassionate One, females. Did they witness, were they present at, their creation? Their testimony, to the effect that they are females, will be written down and they will be questioned, about it in the Hereafter, wherefore punishment will ensue for them.
القرآن:٤٣:١٩

وَجَعَلُوا الْمَلَائِكَةَ الَّذِينَ هُمْ عِبَادُ الرَّحْمَٰنِ إِنَاثًا ۚ أَشَهِدُوا خَلْقَهُمْ ۚ سَتُكْتَبُ شَهَادَتُهُمْ وَيُسْأَلُونَ  

{وجعلوا الملائكة الذين هم عباد الرحمن إناثا أشهدوا} حضروا {خلقهم ستكتب شهادتهم} بأنهم إناث {ويسألون} عنها في الآخرة فيترتب عليهم العقاب.