Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Angular reports NG8117 when a text interpolation refers to a function without calling it. If you want to display the function’s return value, add parentheses—for example, change {{ getValue }} to {{ getValue() }}. The diagnostic is an extended check that requires strictTemplates.

What NG8117 means

NG8117 detects an uninvoked function in a text interpolation. In Angular’s example, the component defines a getValue() function that returns 'value', but the template contains {{ getValue }}. That expression refers to the function; it does not call the function to obtain its return value. Angular describes the rule as: “Functions in text interpolation should be invoked to return a value.” Angular’s NG8117 documentation

How to fix NG8117

Call the function in the interpolation by adding parentheses:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
{{ getValue() }}

Use this correction when the intended displayed value is the function’s result. The key difference is between a function reference, {{ getValue }}, and a function invocation, {{ getValue() }}.

What compiler setting controls the diagnostic?

Angular’s extended diagnostics require strictTemplates. The NG8117 check has no additional prerequisite. If you need to suppress this specific diagnostic, set its check to suppress in tsconfig.json:

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

Suppressing NG8117 only stops Angular from emitting the diagnostic. It does not call the function or make the interpolation display its return value; use {{ getValue() }} when that result is what the template should show.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi