Glass prism (triangular)
The angle of incidence of light rays on one face of the triangular prism and the angle of incidence of the second face of the prism (after the light travels through the prism) are such that the deviations of the colors at each face add up. So the dispersion more enhanced.
This is because of the way the two faces of the prism are inclined to each other (< 90 deg). The individual colors have different angles of refraction and hence different angles of deviation Dm, given by
μ = Sin (A+Dm)/2 ÷ Sin A/2
Hence, they are dispersed and separated by a small angle, which is the difference in their deviations.
Dm = angle of minimum deviation for ONE color = (μ - 1) A
Since μ is different for different colors, Dm is different. hence, we see them separately. Larger the angle A, the larger is the separation between the colors.
The angle between the two faces of a glass slab is 0⁰ (or 180⁰ or 360⁰). Due to this reason, As the two deviations cancel, the incident and emergent rays are both parallel.
We can show this mathematically too.
μ = Sin (A + Dm)/2 ÷ Sin A/2 for the prism. Normally A < 90⁰
Sin (A + Dm)/2 = μ * Sin A/2
A glass slab is a prism with A = 0⁰,
Sin Dm/2 = μ * 0 = 0 =>Dm = 0
Angle of deviation by the slab is 0. Thus the incident ray and emergent ray are parallel for each color. Now, each color in the incident white ray are collinear. Hence, the colors in the emergent ray are collinear.