have come across the concept that services are generally divided into factories and singletons, the main difference being that a singleton (from what I understand) is a single instance of a class that is then shared wherever your components need it. This is different from a factory where a new instance is created for each component that uses it.
The obvious assumption would be that the reason for singletons is so that Angular doesn't have to create multiple copies of the same class, thus freeing up...memory? Basically, is the reason these two things exist mainly have to do efficiently using your computing resources? I really appreciate any answer to this question. -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
