advice..coparenting

How to coparent without feelings... 
My ex and I have been broken up since December... I still love him but he's moving on..he won't even tell me straight up how he feels just so I can move on and get closure.. he just wants to know about the baby.. I don't know how to do this.. i want to be civil with our newly born, it's just hard when I still love him.. last weekend he came to see her and he ended up staying all weekend and everything went smooth him and I were laughing, making jokes we even ended up cuddleing.. I don't know why when he only want to be with the baby.. but I told him I couldn't do it.. that he couldn't stay anymore, just come visit his daughter..because I don't want to grow attachment all over again when I'm still madly in love with him... I'm just wondering how did any of your single momma's move on but still manage to see your ex.. I know i should worry only about the baby... but it's hard once I see him and know everything he said about being a family and everything is all just gone now 😔