Explain what is factory method in angular.js?
Nitin Choudhary
Factory is the place where the objects are created for the first time when its is required, In AngularJS the Controler objects are Instantiated using "Invoke" operations avaibale in "$Injector"
For creating the directive, factory method is used. It is invoked only once, when compiler matches the directive for the first time. By using $injector.invoke the factory method is invoked.