Combining spectroscopic and photometric surveys using angular cross-correlations - I. Algorithm and modelling