I need a clear understanding of service class in angular.Both service class and typescript class are the same use case in my view then what is the difference between two?
In case of implementation all angular service , component , module , pipes .. are just typescript class the only difference between each of them is the decorator,but it 'is possible for any service to don't have a decorator if it's has no dependency
finally to declare any class as service you need add this class to any provider list for module or component so you can injected.
so just look for class decorator and if the class added to any provider list
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With