# `invoke` ( service in module `AUTO` )

## Description

Invoke the method and supply the method arguments from the `$injector` .

## Parameters

- `fn – {!function} –`

  The function to invoke. The function arguments come form the function annotation.

- `self(optional) – {Object=} –`

  The `this` for the invoked method.

- `locals(optional) – {Object=} –`

  Optional object. If preset then any argument names are read from this object first, before the `$injector` is consulted.

## Returns

`{*}` –

the value returned by the invoked `fn` function.