This angular 8/9 example tutorial help to create an Injectable service using angular 8/9. You can also follow the same process to create a service for angular 2 and angular4 applications, Sometimes we need to share some methods across the components, that can be shared between angular components using the Injectable service.
