dispersion mainly depends the peculiar shape of the refracting surfaces
in a prism it is at an angle and they intersect so dispersion depends on that angle
in a glass slab the sides are parallel.they never intersect .
if a glass slab is cut diagonally it will disperse light
If the two interface surfaces are parallel to each other, as in a 'slab' of glass, all of the bending (and dispersion) that takes place at the first interfaces is exactly reversed at the second, 'undoing' the effect of the first interface; so although the emerging ray of light is displaced slightly from the entering ray, it travels in the same direction as the incoming ray and all wavelengths that separated at the first interface are re-combined.
If the second interface is NOT parallel to the first, as in a prism, the effects of the first interface are NOT reversed and the colors separated at that interface continue along different paths upon leaving the glass.