Join ExamsbookAnswer : 2. "It is used to create the service"
What is factory method in AngularJS ?5
Q: What is factory method in AngularJS ?
- 1It generates the facts and figuresfalse
- 2It is used to create the servicetrue
- 3It is used to calculate the factorial of a numberfalse
- 4All the abovefalse
- Show AnswerHide Answer
- Workspace
Answer : 2. "It is used to create the service"
Explanation :
Answer: B) 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 ismodule.factory('factoryName', function);