I was angry with her because I was not invited to her party.
I was angry with her for not being invited to her party.
Is the second sentence meaningful/grammatical. If yes, do these sentences have the same meaning.
English Language Learners Stack Exchange is a question and answer site for speakers of other languages learning English. It only takes a minute to sign up.Sign up to join this community
They are both grammatical but the meaning is not quite the same.
The second sentence has an elliptical subject. That is, the subject of "being" is implied. You have to look further back in the sentence to find it.
Most of the time, if not every time, the implied subject in this structure is the target of the emotion. So in this case that would be her.
Therefore, you're angry with her because she wasn't invited to her party (I guess another woman's or girl's party). As you can already guess, this doesn't make much sense because a person doesn't decide whether or not they're invited to a party.
So the sentence you want is the first one.
Here are a few examples of the second structure so you can see how the implied subject works:
I was angry with her for not inviting me to her party. [She didn't invite me.]
I was angry with the kids for lying to my face. [The kids lied to my face.]
The kids were angry with their parents for grounding them. [The parents grounded the children.]