Angular resonances in the emission from a dipole located near a grating