The shooting happened about 9:15 p.m. in the area of Leeward and Magnolia avenues.
According to the Los Angeles Police Department, two undercover police officers in an unrelated investigation intervened in a gang-related shooting. Authorities said the officers approached a man who was shooting at a group of people across the street, possibly rivals, with a shotgun. That gunman shot at the officers.
The officers suffered gunshot wounds to their faces and were rushed to the hospital.
The two juveniles were detained at the scene and were charged Sunday.
Police said two other people who were involved got away. Witnesses told police that the suspects may have fled in a red Mitsubishi or a Nissan sedan.
The officers, whose identities were not released, were transported to California Hospital Medical Center. Officials said one officer suffered a superficial graze wound to his face and was released after treatment.
The other officer was listed in serious but stable condition with a gunshot wound close to his eye.
"The doctor was able to save the eye, but they were unsure if he was going to lose vision," Sgt. Dave Budek said.
Both officers were expected to be OK.
The injured officers are stationed at the Olympic Station.
Following the shooting, the LAPD went on a city-wide tactical alert, meaning they kept officers from other stations on duty beyond their normal shifts in order to deploy about 100 officers in the area to search for the suspects.
The scene remained active Sunday morning. Vermont Street between Wilshire Boulevard and 8th Street were blocked due to the investigation, but were reopened.
Anyone with information regarding the shooting is urged to contact the LAPD at (877) LAPD-24-7 or (877) 527-3247.