Dear student
Since the prism has angular sides, there is a net deviation produced.So in case of a prism, when a white light passes through prism each of the constituent wavelength of light undergoes distinct extent of deviation, this results in the dispersion of white light into its constituent colours.On the other hand, the light passes through the parallel sides of glass slab, each constituent wavelength of white light does not undergo any net deviation. Hence the white light does not split into constituent spectrum.
Regards.