The 25-year-old woman from Diepsloot cannot be named to protect the identity of the child.
She is facing charges of attempted murder and malicious damage to property.
The state is opposing bail.
The investigating officer‚ Sergeant Abraham Thipe‚ said the woman‚ who was arrested at the scene‚ stabbed the child in full view of police officers and other witnesses.
“The suspect stabbed the child even when the police begged her to stop. The police had to break the window to save the child.”
Thipe said it would not be in the interests of justice to release the woman on bail as the community is angry.
In her affidavit‚ the woman said she intends to plead guilty as she has no “valid excuse” for her actions.