★ Attribute() constructor
Attribute()
Attribute()constructor(name: Name, value: Value) {
super(Attribute.template`${name}${value}`);
this.#name = String(name) as Name;
this.#value = String(value) as Value;
}Parameters
Name: type
Description
Returns
Example usage
// Example usage.
import { Attribute } from '@angular-package/tag';
// Returns Attribute {'color="red"'} of type Attribute<"color", "red">.
new Attribute('color', 'red');Last updated