# AUR0713

### **Error message**

Template compilation error: unknown binding command: "{{0}}".{{0:bindingCommandHelp}}

### **Parameters**

1. `commandName`: The name of the unrecognized binding command.

### Error explanation

This error occurs during template compilation when an attribute uses a binding command (the part after the dot, like `.bind`, `.trigger`, `.for`) that is not registered or known to the template compiler. This could be due to a typo, using a command that doesn't exist, or forgetting to register a custom binding command.

The error message may also include additional help text (after the period) for common mistakes, such as suggesting `.trigger` for the removed `.delegate` command, or suggesting lambdas for the removed `.call` command.

### Common causes

* A typo in the binding command name (e.g., `value.bnd` instead of `value.bind`).
* Using a binding command that does not exist or is not registered (e.g., `value.nonexistent`).
* Forgetting to register a custom binding command via application configuration or `@bindingCommand` decorator.
* Attempting to use Aurelia v1 binding commands like `.delegate` or `.call` without appropriate compatibility configuration.

### How to fix

* Correct any typos in the binding command name. Standard commands include `bind`, `one-time`, `to-view`, `from-view`, `two-way`, `trigger`, `capture`, `for`, `ref`, `style`, `class`, `attr`, `spread`.
* Ensure any custom binding commands are properly defined and registered with the DI container.
* If migrating from v1, replace `.delegate` with `.trigger` and `.call` with lambda expressions or ensure compatibility settings are active.

### Example of Incorrect Usage:

```html
<!-- Error: Typo in binding command -->
<input value.bnd="message">

<!-- Error: Non-existent command -->
<button click.action="doSomething()"></button>

<!-- Error: V1 command without compat -->
<button click.delegate="handleClick()"></button>
```

### Example of Correct Usage:

```html
<!-- Correct command -->
<input value.bind="message">

<!-- Correct command -->
<button click.trigger="doSomething()"></button>

<!-- Correct command -->
<button click.trigger="handleClick()"></button>

<!-- Correct custom command (assuming 'my-cmd' is registered) -->
<div special.my-cmd="value"></div>
```
