"Tangent" is used in at least 2 ways in mathematics: first as the trigonometric function and second as a line which touches (but does not cross) another line in only a single point. Remember 2 non-straight lines can be tangent to each other (often called osculatory).
The slope of a straight line is well-defined and it is equal to the tangent of the angle which the straight line makes with the x axis. A straight line which is tangent to a curve also has a slope!
Im' not sure that answers your question, but I hope it helps.