# AUR0157

## Error Message

`AUR0157: Expression error: invalid empty expression. Empty expression is only valid in event bindings (trigger, delegate, capture etc...)`

## Description

This error occurs when an empty binding expression is used in contexts where it's not allowed. Empty expressions are only valid for event bindings where they can be used to prevent default behavior.

## Common Scenarios

```html
<!-- ❌ Wrong: Empty expressions in property bindings -->
<div textcontent.bind=""></div>
<input value.bind="">

<!-- ✅ Correct: Empty expressions in event bindings -->
<form submit.trigger=""><!-- Prevents default form submission -->
<a href="#" click.trigger=""><!-- Prevents navigation -->
```

## Solution

```html
<!-- ✅ Correct: Provide actual expressions -->
<div textcontent.bind="message || 'Default text'"></div>
<input value.bind="inputValue">

<!-- ✅ Correct: Event bindings can be empty -->
<form submit.trigger="handleSubmit()">
<a href="#" click.trigger="handleClick()">
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aurelia.io/developer-guides/error-messages/0151-to-0179/aur0157.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
