Get Started
829

Q: What is factory method in AngularJS ?

  • 1
    It generates the facts and figures
  • 2
    It is used to create the service
  • 3
    It is used to calculate the factorial of a number
  • 4
    All the above
  • Show 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);

The Most Comprehensive Exam Preparation Platform

Get the Examsbook Prep App Today