In angular DOC
Register a value service with the $injector, such as a string, a number, an array, an object or a function. This is short for registering a service where its provider's $get property is a factory function that takes no arguments and returns the value service.
In the bold text, that says $get property is a factory function that takes no arguments
, I know about the $get
function in a angular providers
which will be invoked using $injector.invoke()
when an instance needs to be created and it is must have a $get
function in a provider.
my question is about what is the underlying meaning of function that takes no arguments
?
much appreciate if someone can describe the inner pieces of the angular
values service
& factory service
with comparing both with the above doc quote. Thanks.