For instance, section 'Create' should have state variables for these:
Timetable object to show in <ds-timetable> object on the left column (which is stored in the scope for CreateCtrl for now)
List of generated timetables (which is stored in TimetableGenerator service for now)
Selected timetable to show details of, or its index in the list of generated timetables (which is not stored now)
It seems better to gather these variables in single service for maintainability. Therefore, it is advisable to create a service that manages state variables for each of UI sections. e.g. CreateSectionState
Service CourseCart already does this kind of role, and its content could be considered as one of 'state variables'. However, since this might be shared across multiple UI sections, it seems better to leave it as-is.
For instance, section 'Create' should have state variables for these:
<ds-timetable>
object on the left column (which is stored in the scope forCreateCtrl
for now)TimetableGenerator
service for now)It seems better to gather these variables in single service for maintainability. Therefore, it is advisable to create a service that manages state variables for each of UI sections. e.g.
CreateSectionState
Service
CourseCart
already does this kind of role, and its content could be considered as one of 'state variables'. However, since this might be shared across multiple UI sections, it seems better to leave it as-is.