The angular momentum problem and magnetic braking - an exact time-dependent solution