Injects dependencies by calling a method on the component instance.
Methods
-
method(methodName, dependencyKey, options)
-
Invoke the specified method as part of resolving the instance on which the method is called, optionally configuring dependencies to be passed as method parameters.
Parameters:
Name Type Argument Description methodNamestring The name of the method to invoke. dependencyKeystring <optional>
<repeatable>
A dependency key to resolve and pass as an argument to the method. optionsobject <optional>
An options object. Properties
Name Type Argument Description awaitboolean <optional>
When true, and aPromiseis returned from the specified method, the resolution of the instance on which the method is being called will not complete until thePromiseresolves or fails.