And now it is even easier than Kay's answer -first use 'explode lines' tool, yielding all line segments, then calculate azimuth with field calculator: main_angle($geometry)