B.M.
Remember that kids get the most mad at the parent they CAN be mad at, not generally the person they are ACTUALLY mad at. She probably knows you will love her no matter what and is secure with the relationship the two of you have, so it's easier to displace all her feelings about stuff she can't understand to being mad at you.
Also, they want to live with the parent they have the most fun with. You said you and she moved into an apartment. Does her dad still live where you all lived together? If so, she may want to move back there because that was her room and her kitchen and her back yard or whatever, and if she moves back and lives there then eventually you will move back too. Did you re-do her room at the new place? Did she get to pick out new paint and stuff for the walls? New bedding? This is a great way to get her to love her new place.
At 4, she doesn't have the skills to understand what is going on and it may take a couple YEARS before she stops being mad (she just can't ACT inappropriately, but she can feel any way she wants) and starts to understands why she doesn't get to live with the two people she loves. She doesn't really care (and shouldn't have to) that YOU wanted to move. She didn't. She's 4. Just love her and keep explaining (without frustration) that this is the best thing for everyone. Validate how she feels by saying "I know you want to live with dad, but your dad and I decided you would live here".
Very hard situation - Good luck!