Sounds like your wall outlet also serves as a junction box for the wires coming & going to the switch. If the wall outlet works fine, but doesn't turn off with the switch, then you have wired it to the "hot" side, or the supply-side of the switch. It's too late to tell you to connect the same wires that were in the old outlet into this new outlet, so you'll want to turn off the circuit breaker to this outlet, reopen the outlet cover, unscrew this outlet/charger and look for unused wires in the receptacle box. There's probably a 2-wire or 2-wire plus ground cable that runs to the switch. When the switch is ON, both wires are hot (meaning they have power if you measure with a voltmeter or indicator light when the circuit breaker is back on). When the switch is off, one wire will still be hot (supply-side) and the other will be cold (load side). Cold means no voltage from that wire to ground. It's this cold wire you want going into the outlet, along with the ground wire and the return wire. I'd reference colors, such as black is hot and white is return, but your outlet may have broken that protocol when the switch was placed in-line. It's best to measure with a voltmeter to be sure.
By the way, any unused wires in the receptacle box need to be capped with an insulated wire screw and electrical tape. Can't have those accidentally touching something in the box!