Adding services in SNC
The components are essential feature of any application built with Angular, but components can only take us so far. The purpose of components is to provide us with a placeholder for the user interface and its respective logic. The component is a combination of a UI template, its style, and the UI logic to display the data. For any meaningful application, we would also have associated business logic which is not directly related to a specific view, or a need to share data between multiple components, and this is where services come in.
Application logic can be broadly divided into two forms: UI logic, which resides in components, and the business logic, which resides in services. The business logic encapsulates commonly ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access