In the present work we have analysed the effect of dark matter haloes on the orbital and escape dynamics of stars in barred galaxies. For that, a three-dimensional gravitational model composed by central bulge, bar, disc and dark matter halo have been studied from the viewpoint of escape in an open Hamiltonian system. In addition this model is investigated for the following dark matter halo profiles viz. oblate and NFW. In both cases, escape mechanism has been observed near the saddle points corresponding to the bar ends.We visualise the nature of stellar orbits in the plane of the bar. Further Poincaré surface section maps in several phase planes for different escape energy values have been plotted to visualise the chaotic and regular domains of motion. Finally the variation of chaos with the dark matter halo parameters viz. mass, size, circular velocity and nature has been investigated. Our result shows that the oblate haloes are preferred to justify the formation of full-fledged spiral arms and extended dark matter distributions in the giant spirals than the NFW haloes, only if they host central super massive black holes (SMBHs). Again, in the absence of SMBHs, the oblate haloes well justify the formation of less prominent or poor spiral arms and dark matter dominated cores in the dwarf and LSB galaxies. We also found that, for the NFW haloes, extreme central baryonic feedback is required to form spiral patterns and such haloes should preferred for the galaxies with extremely energetic centres.