> For the complete documentation index, see [llms.txt](https://tag.angular-package.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tag.angular-package.dev/attribute/instance/methods/tostring.md).

# toString()

### `Attribute.prototype.toString()`

Returns attribute, the primitive value of a specified [`Attribute`](/attribute/attribute.md) object.

{% code title="attribute.class.ts" %}

```typescript
public toString(): `${Name}="${Value}"` {
  return this.valueOf();
}
```

{% endcode %}

### Returns

The **return value** is the attribute of generic type variables [`Name`](/attribute/generic-type-variables.md#wrap-opening) and [`Value`](https://tag.angular-package.dev/attribute/instance/methods/pages/iQwmCbLKUWR7oXo4hkkM#attribute-less-than...-value-greater-than) on the template `${Name}="${Value}"`.

### Example usage

```typescript
// Example usage.
import { Attribute } from '@angular-package/tag';


```
