Hydrodynamical simulations of galaxy formation in spatially flat cold dark
matter (CDM) cosmologies with and without a cosmological constant (Lambda)
are described. A simple star formation algorithm is employed and radiative
cooling is allowed only after redshift z = 1 so that enough hot gas is avai
lable to form large, rapidly rotating stellar discs if angular momentum is
approximately conserved during collapse. The specific angular momenta of th
e final galaxies are found to be sensitive to the assumed background cosmol
ogy. This dependence arises from the different angular momenta contained in
the haloes at the epoch when the gas begins to collapse and the inhomogene
ity of the subsequent halo evolution. In the Lambda-dominated cosmology, th
e ratio of stellar specific angular momentum to that of the dark matter hal
o (measured at the virial radius) has a median value of similar to 0.24 at
z = 0. The corresponding quantity for the Lambda = 0 cosmology is over thre
e times lower. It is concluded that the observed frequency and angular mome
nta of disc galaxies pose significant problems for spatially flat CDM model
s with Lambda = 0 but may be consistent with a Lambda-dominated CDM univers
e.