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 methodName
string The name of the method to invoke. dependencyKey
string <optional>
<repeatable>
A dependency key to resolve and pass as an argument to the method. options
object <optional>
An options object. Properties
Name Type Argument Description await
boolean <optional>
When true
, and aPromise
is returned from the specified method, the resolution of the instance on which the method is being called will not complete until thePromise
resolves or fails.