As far as I can tell, Angelfish will be fine on their own.
But they aren't so aggressive that they'll rip each other to shreds, nor are they armed to do so. Mine will only ever peck at each other's bodies and chase each other around, though they do it quite often. I keep a trio in 75g. I've never seen them damage each other's fins, even when the breeding pair gangs up on the third wheeler. Though you will see fin damage after a unsuccessful spawning "for some reason".
In a 40g, you can keep a pair I'm guessing. They're quite easy to vent even without flipping them, but you can keep same sexes and likely not have consequences. Keep a few dithers just in case.
Then again, this is coming from the guy who successfully kept a pair of bettas in a 20g. Maybe I'm just lucky.