What is a factory method in angularjs?



What is a factory method in angularjs?..

Answer / Ankur Gupta

A Factory Method in AngularJS is a function that returns an object. It's often used to create complex objects or services that can be injected as dependencies into other parts of the application. The factory method is defined using the $injector service, and it can accept parameters for configuration.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AngularJS Interview Questions

What are the fundamentals concepts of angular 2?

1 Answers  


What is the use of @Input and @Output?

1 Answers  


What are scopeless controller in angularjs?

1 Answers  


Why do we need provider aliases?

1 Answers  


What is if-else-and-then conditions in angular4?

1 Answers  


What is the use of lazy loading in angular 6?

1 Answers  


How to validate email in angular 4 using formgroup or custom regexp?

1 Answers  


Explain component decorators in angular 4?

1 Answers  


What angular is doing with bazel compiler?

1 Answers  


Give the example of angularjs object?

1 Answers  


What are guards in angular 2?

1 Answers  


Explain api and how do we exchange the data from client side to server?

1 Answers  


Categories