# toString()

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

Returns attribute, the primitive value of a specified [`Attribute`](https://tag.angular-package.dev/attribute/attribute) 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`](https://tag.angular-package.dev/generic-type-variables#wrap-opening) and [`Value`](https://tag.angular-package.dev/generic-type-variables#attribute-less-than...-value-greater-than) on the template `${Name}="${Value}"`.

### Example usage

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


```
