Services & DI
Services & DI (and) is simple if you keep it on paper. Asha uses it for MarksService shared by two pages in the campus app.
Services & DI (and) order — meaning → @Injectable + constructor inject → one limit. Dumping ten features helps nobody.
Without Services & DI (and), the campus app gets messy and MarksService shared by two pages is hard to trust.
Services & DI (and) shows up in the campus app. Name MarksService shared by two pages, not “a real-world scenario”.
Services & DI (and) trap — new MarksService() in each component. Asha loses marks for that every viva.
Services & DI (and) is not a lonely heading. Asha ties it to MarksService shared by two pages.
One breath for Services & DI (and), then MarksService shared by two pages, then new MarksService() in each component. Sit down.
MarksPage ──inject──► MarksService ReportPage ──inject──► MarksService one root instance
For Services & DI (and): definition + the campus app + one failure.