It sounds like the freehub body ratchets have failed. Given the nature of the failure ("...a loud bang.....") it appears to more than minor sticking pawls which can be fixed by dripping in some lube. I'm pretty sure you need a new freehub body.
If it's a common hub, like a Shimano, the body can be replaced at reasonable cost.