# AUR0710

### **Error message**

Template compilation error: bindable properties of local element "{{0}}" template needs to be defined directly under `<template>`.

### **Parameters**

1. `localElementName`: The name of the local element being defined (`as-custom-element` value).

### Error explanation

This error occurs during template compilation when a `<bindable>` element, used to define bindable properties for a local element, is found nested inside another element within the local element's `<template as-custom-element="...">`. Bindable definitions for local elements must be direct children of the `<template>` tag that defines the local element.

### Common causes

* Placing a `<bindable property="...">` tag inside a `<div>`, `<span>`, or any other element within the `<template as-custom-element="...">`.

### How to fix

* Move the `<bindable>` tag(s) so that they are direct children of the `<template as-custom-element="...">` tag.

### Example of Incorrect Usage:

```html
<!-- my-component.html -->
<template>
  <local-element message="Hello"></local-element>

  <template as-custom-element="local-element">
    <div>
      <!-- Error: <bindable> is nested inside a div -->
      <bindable property="message"></bindable>
    </div>
    <span>${message}</span>
  </template>
</template>
```

### Example of Correct Usage:

```html
<!-- my-component.html -->
<template>
  <local-element message="Hello"></local-element>

  <template as-custom-element="local-element">
    <!-- Correct: <bindable> is a direct child of the template -->
    <bindable property="message"></bindable>

    <div>
      <span>${message}</span>
    </div>
  </template>
</template>
```


---

# 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/0088-to-0723/aur0710.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.
