# Functions should be invoked in text interpolation.

This diagnostic detects uninvoked functions in text interpolation.

```angular-ts
import {Component} from '@angular/core';

@Component({
  template: `{{ getValue }}`,
})
class MyComponent {
  getValue() {
    return 'value';
  }
}
```

## What's wrong with that?

Functions in text interpolation should be invoked to return a value.
If the function is not invoked, it will not return any value and the interpolation will not work as expected.

## What should I do instead?

Ensure to invoke the function when you use it in text interpolation to return the value.

```angular-ts
import {Component} from '@angular/core';

@Component({
  template: `{{ getValue() }}`,
})
class MyComponent {
  getValue() {
    return 'value';
  }
}
```

## Configuration requirements

[`strictTemplates`](/tools/cli/template-typecheck#strict-mode) must be enabled for any extended diagnostic to emit.
`uninvokedFunctionInTextInterpolation` has no additional requirements beyond `strictTemplates`.

## What if I can't avoid this?

This diagnostic can be disabled by editing the project's `tsconfig.json` file:

```json
{
  "angularCompilerOptions": {
    "extendedDiagnostics": {
      "checks": {
        "uninvokedFunctionInTextInterpolation": "suppress"
      }
    }
  }
}
```

See [extended diagnostic configuration](/extended-diagnostics#configuration) for more info.
