2
Reply

Explain what is factory method in angular.js?

Nitin Choudhary

Nitin Choudhary

10y
1.7k
0
Reply

    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.