July 2017
Intermediate to advanced
454 pages
10h 1m
English
Services are user-defined classes used to solve problems. Angular recommends only having template-specific codes in components. A component's responsibility is to enrich the UI/UX in the Angular application and delegate business logic to services. Components are consumers of services:
Application-specific or business logic such as persisting application data, logging errors, and file storage should be delegated to services, and components should consume the respective services to deal with the appropriate business or application-specific logic:
For example, we can have a service called BookService that deals with inserting new books, ...
Read now
Unlock full access