> 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/aur0723.md).

# AUR0723

Template compilation error: Invalid comma-separated class binding syntax in yyyy. It resulted in no valid class names after parsing.

### **Error message**

Template compilation error: Invalid comma-separated class binding syntax in {{0}}. It resulted in no valid class names after parsing.

### **Parameters**

1. `target`: The invalid comma-separated string provided as the target for the `.class` binding command.

### Error explanation

This error occurs when using the `.class` binding command with a comma-separated list of class names as the target, but the list is invalid or results in no actual class names after processing. This typically happens if the string contains only commas or whitespace between commas.

The `.class` binding command allows specifying multiple static classes along with the dynamic binding, like `my-class,another-class.class="expression"`. The part before `.class` is split by commas, and each part should be a valid class name.

### Common causes

* Providing only commas or whitespace as the target for `.class` (e.g., `, .class="expr"`).
* Having trailing or leading commas without valid class names in between (e.g., `my-class,.class="expr"`).

### How to fix

* Ensure that if you use a comma-separated list for the `.class` binding target, it contains valid class names separated by commas.
* Remove unnecessary commas or whitespace.
* If you only intend to bind dynamically without static classes, use `class.bind="expression"` instead of `.class="expression"`.

### Example of Incorrect Usage:

```html
<!-- Error: Only a comma before .class -->
<div ,.class="isActive ? 'active' : ''"></div>

<!-- Error: Comma with whitespace before .class -->
<div  ,  .class="isActive ? 'active' : ''"></div>

<!-- Error: Trailing comma -->
<div my-static-class,.class="isActive ? 'active' : ''"></div>
```

### Example of Correct Usage:

```html
<!-- Binding dynamic class only -->
<div class.bind="isActive ? 'active' : ''"></div>

<!-- Binding dynamic class with one static class -->
<div my-static-class.class="isActive ? 'active' : ''"></div>

<!-- Binding dynamic class with multiple static classes -->
<div my-static-class,another-one.class="isActive ? 'active' : ''"></div>
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.aurelia.io/developer-guides/error-messages/0088-to-0723/aur0723.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
