> For the complete documentation index, see [llms.txt](https://docs.aurelia.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aurelia.io/developer-guides/error-messages/0088-to-0723/aur0715.md).

# AUR0715

### **Error message**

Template compilation error: the value of "as-custom-element" attribute cannot be empty for local element in element "{{0}}"

### **Parameters**

1. `owningElementName`: The name of the custom element whose template contains the invalid local element definition.

### Error explanation

This error occurs during template compilation when a local element definition (`<template as-custom-element="...">`) has an empty value for the `as-custom-element` attribute. This attribute is required to provide a unique name for the local element within the scope of its parent component.

### Common causes

* Using `<template as-custom-element>` without providing a name (e.g., `<template as-custom-element>`).
* Setting the attribute value to an empty string (e.g., `<template as-custom-element="">`).

### How to fix

* Provide a valid, non-empty, unique name for the local element in the `as-custom-element` attribute. The name should follow custom element naming conventions (kebab-case, containing a hyphen).

### Example of Incorrect Usage:

```html
<!-- my-component.html -->
<template>
  <my-local-element></my-local-element>

  <!-- Error: as-custom-element value is empty -->
  <template as-custom-element="">
    <div>Content</div>
  </template>
</template>
```

### Example of Correct Usage:

```html
<!-- my-component.html -->
<template>
  <my-local-element></my-local-element>

  <!-- Correct: A valid name is provided -->
  <template as-custom-element="my-local-element">
    <div>Content</div>
  </template>
</template>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/aur0715.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.
