Answers

Question and Answer:

  Home  AngularJS Developer

⟩ Explain me what is factory method in AngularJS?

Factory method is used for creating a directive. It is invoked when the compiler matches the directive for the first time. We can invoke the factory method using $injector.invoke.

Syntax: module.factory( 'factoryName', function );

Result: When declaring factoryName as an injectable argument you will be provided with the value that is returned by invoking the function reference passed to module.factory.

 176 views

More Questions for you: