Define Factory method in AngularJs

Factory method is quite similar to service; factories implement a module pattern in which we use a factory method to generate an object which is used for building models.

In a factory, a method object is returned at the end by creating a new object and adding functions as properties.

Syntax:

module.factory(‘factoryName', function);

Top 50+ Angular Interview Questions with Answers

Angular is one of the most current web development frameworks around the world.  In almost every interview, you will have… Read More

4 years ago