。
I took the bus so I wouldn't be late for my appointment.
Literal
Promise [gen-の] time [to-に] not-be-late [purpose-ように] bus [on-に] boarded.
~ように here is the purpose/aim marker — '(in order) that (one) not be late.' Distinct from its directive use ('make sure that, see to it that'), the purposive ~ように attaches to a non-volitional or negative verb to mean 'so as not to / so that one will not.' 乗る takes its destination/vehicle with に.