logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • What is factory method in AngularJS ?


  • Options
  • A. It generates the facts and figures
  • B. It is used to create the service
  • C. It is used to calculate the factorial of a number
  • D. All the above

  • 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);

  • Tags: Analyst, Software Architect

    Technology problems


    Search Results


    • 1. What are the core directives of AngularJS?
    • Discuss
    • 2. What is a data binding in AngularJS?
    • Discuss
    • 3. How to upload struts file in DHTML?
    • Discuss
    • 4. Explain in brief B2B, B2C, C2B and C2C.
    • Discuss
    • 5. What are the privacy and security features being provided by web browsers?
    • Discuss
    • 6. What is the main reason of using process lifecycle in Android?
    • Discuss
    • 7. Explain about Blackberry Enterprise Server.
    • Discuss
    • 8. What is 3G?
    • Discuss
    • 9. Describe how to step through code in .NET.
    • Discuss
    • 10. What are the Web Form Events available in ASP.NET?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment