I have a pretty good understanding of Angular, but I am starting to dabble with Typescript and Angular.
What is the difference between a factory, service and provider as far as setting up the module.
Example:
var app = angular.module('app', []);
//Setting up a factory
app.factory('TestFactory', ['$http', TypescriptModule.TestFactory]);
// Or
app.factory('TestFactory', ['$http', ($http) => new TypescriptModule.TestFactory($http)]);
//Setting up a service
app.service('TestService', ['$scope', TypescriptModule.TestService]);
// Or
app.service('TestService', ['$scope', ($scope) => new TypescriptModule.TestService($scope)]);
I guess what I am getting to is that you have to instantiate a factory, whereas a service's constructor is called for you?
What about providers? And while we are on the subject, what about constants, values, etc.?