Interviews2 answers
Explain what is factory method in angular.js?
2 Answers
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"
Bhuvanesh MohankumarPosted May 19, 2016, 5:05 AM EDT
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.
Nitin ChoudharyPosted Jan 20, 2015, 2:42 AM EST

