I have been using angular for a long time and I read a lot of information about the differences between using .service (...) and .factory (...) in angular, the main point is that .service () creates an instance and an instance of the object for you . But I have not read yet why this is useful, because .service (...) gives you the same instance every time you use it.
So, what's the point of even having this function in angular when every instance is the same - why not just use factory (...) and remove the service () from the framework? I donβt understand why they even have a function that instantiates objects, if you can only have one instance?
source share