# AUR0754

## Error Message

`AUR0754: Attribute <attribute-name> is not registered in <component-name>.`

Where `<attribute-name>` is the name of the template controller attribute used (e.g., `if`, `repeat`), and `<component-name>` is the name of the component whose template is being rendered.

## Description

This error occurs during rendering when Aurelia encounters a template controller attribute (e.g., `<div if.bind="condition">`, `<div repeat.for="item of items">`), but it cannot find the definition for that specific template controller within the resources registered for the current component or globally.

## Cause

While the built-in template controllers (`if`, `else`, `repeat.for`, `switch`, `case`, `default-case`, `promise.resolve`, `pending`, `then`, `catch`, `portal`) are usually available by default when using the `StandardConfiguration` or `DefaultComponents`, this error can still occur if:

1. **Minimal Configuration:** You are using a minimal Aurelia configuration (e.g., `Aurelia.register()`) that does not include the standard template controllers, and you haven't registered them manually.
2. **Custom Template Controller Issues:**
   * **Missing Import:** A custom template controller class was not imported.
   * **Missing `dependencies`:** The imported custom template controller was not added to the `dependencies` array.
   * **Typo:** The name used in the template (e.g., `my-repeater.for`) doesn't match the registered name.
   * **Incorrect Registration:** A custom template controller wasn't registered correctly.
3. **Build/Bundling Issues:** The necessary template controller definitions (standard or custom) are not being included in the final build.

## Solution

1. **Use Standard Configuration:** Ensure you are registering the `StandardConfiguration` or `DefaultComponents` when bootstrapping Aurelia if you intend to use the built-in template controllers.

   ```typescript
   import Aurelia, { StandardConfiguration } from 'aurelia';

   Aurelia
     .register(StandardConfiguration) // Includes default template controllers
     .app(MyApp)
     .start();
   ```
2. **Register Manually (Minimal Config):** If using a minimal setup, explicitly register the template controllers you need.

   ```typescript
   import Aurelia from 'aurelia';
   import { IfRegistration, RepeatRegistration } from '@aurelia/runtime-html'; // Example imports

   Aurelia
     .register(
       IfRegistration, // Register 'if' and 'else'
       RepeatRegistration // Register 'repeat.for'
       // ... other needed registrations
     )
     .app(MyApp)
     .start();
   ```
3. **For Custom Template Controllers:**
   * **Import:** Import the controller class.
   * **Add to Dependencies:** Include it in the `dependencies` array of the component using it.
   * **Verify Name:** Check the name in the template against its definition.
   * **Check Registration:** Ensure correct local or global registration.
4. **Verify Build:** Check the build/bundler configuration.

## Debugging Tips

* Confirm which configuration preset (`StandardConfiguration`, etc.) you are using during bootstrap.
* If using a minimal configuration, verify that all necessary template controllers (built-in or custom) are explicitly registered.
* For custom template controllers, follow the same debugging steps as for custom elements (AUR0752) and attributes (AUR0753): check imports, dependencies, names, and build output.


---

# 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/runtime-html/aur0754.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.
