Consider a unit vector in the direction of a given line. In two dimensions, it is <cos(\theta), sin(\theta)> where \theta is the angle the line makes with the x-axis. (And the slope is tan(\theta).)
A unit vector in three dimensions is given by <cos(\alpha), cos(\beta), cos(\gamma)> (the "direction cosines" of the direction) where \alpha is the angle the line makes with the x axis, \beta is the angle the line makes with the y axis, and \gamma is the angle the line makes with the z axis. Because this is a unit vector, these must satisfy cos^2(\alpha)+ cos^2(\beta)+ cos^2(\gamma)= 1 but this still depends upon two angles so we cannot give a single number, slope or other, that determines the direction of the line.
(Note that in two dimensions we can take \gamma= 0 so cos^2(\alpha)+ cos^2(\beta)= 1 which means that cos(\beta)= sin(\alpha).)