Home » Interview » Technology

What is factory method in AngularJS ?

Correct Answer: It is used to create the service

Explanation:

In general, Services are Javscript functions and are responsible to do a specific tasks. Factories implements module pattern in which we use a factory method to generate an object which is use for building models.


It's syntax is
module.factory('factoryName', function);


← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion