briggySmalls / late-train-mate

A lightweight website that provides stats on delayed or cancelled UK train services
MIT License
0 stars 0 forks source link

Remove resourceService dependency from model #31

Open briggySmalls opened 6 years ago

briggySmalls commented 6 years ago

Currently the MetricsCollection/Metrics/JourneyDetails model classes all have a dependency on the ResourceService.

This is mainly in order to convert station codes to Station objects, allow handy lookup of their human readable name.

However it appears Angular's opinion is that dependency-injected objects belong in the Angular world and shouldn't be passed down into pure classes.

Consider removing this dependency, as it mainly just functions as a method to obtain human readable information from codes.

briggySmalls commented 6 years ago

I'm keen on this still, it is one of the ugliest aspects of the code right now.