It's fiddly, but it can be done in place.
It's a long time since i've done it, but I think I attached it from the top with the nut first, then to the flap, with just enough wiggle room to hold the threaded end of the rod still whilst pinching up the fastening nut to the flap.
Just make sure the flap moves freely and the return spring is in situ.