We investigate the magnitude and internal alignment of the angular momentum of cold dark matter haloes in simulations with and without baryons. We analyse the cumulative angular momentum profiles of hundreds of thousands of haloes in the Millennium simulation and in a smaller, but higher resolution, simulation, in total spanning 5 orders of magnitude in mass. For haloes of a given mass, the median specific angular momentum increases as j(<r) proportional to r. The direction of the vector varies considerably with radius: the median angle between the inner (< 0.25 Rvir) and total (< Rvir) angular momentum vectors is about 25degr. To investigate how baryons affect halo spin, we use another high resolution simulation, which includes gas cooling, star formation and feedback. This simulation produces a sample of galaxies with a realistic distribution of disc-to-total ratios. The formation of the galaxy spins up the dark matter within 0.1 Rvir such that the specific halo angular momentum increases by approx 50% in the median. The dark matter angular momentum becomes better aligned, but there remains a broad distribution of (mis-)alignments between the halo and the central galaxy, with a median angle between their angular momenta of ~ 30degr. Galaxies have a range of orientations relative to the shape of the halo: half of them have their minor axes misaligned by more than 45degr. Finally, we align a sample of haloes according to the orientation of their galaxies and stack the projected mass distributions. Although the individual haloes are aspherical, galaxy--halo misalignments produce a stacked mass distribution that is indistinguishable from circular. If the misalignment found in our simulations is realistic, it will be extremely difficult for weak lensing studies to measure the shape of dark haloes using this technique.