Is there a good reason to use factory:
app.factory("Items", function() {
...
} );
instead of the IIFE module template:
var Items = (function() {
...
}());
- no need to enter it into controllers, etc., it is always available
- I can see it in the console, and I can not do it with the factory (or am I wrong?)
I am sure that I will find a few more reasons, so what are the advantages in favor of the factory? Thanks
source
share