QUANTICO, Va. — President Trump said Friday there is tremendous anger over what he called the FBI’s “disgraceful” behavior, taking aim at the bureau just before he appeared at its training facility to praise the nation’s police officers.

“It’s a shame what’s happened with the FBI,” the president said as he prepared to depart for a ceremony at the FBI’s National Academy in Quantico, where more than 200 law enforcement officers graduated from a program that imparts FBI expertise and standards.

Trump appeared to be referring to revelations that senior FBI officials exchanged anti-Trump and pro-Hillary Clinton text messages while working on the 2016 probe of Clinton’s use of a private email server while she was secretary of state and again during Robert Muel’s investigation into Russian interference in the presidential election.