1.

What is the factory method?

Answer»

The factory METHOD, used for creating a directive, gets invoked when the compiler matches the directive for the first TIME. This function can be invoked by $injector.invoke.

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

When you declare factoryName as an injectable ARGUMENT, you will get the VALUE which will be RETURNED by invoking the function reference passed to the module.factory.



Discussion

No Comment Found