The accessor returns the tag attributes if set, otherwise undefined.
public get attributes(): Attributes | undefined {
return this.#attributes;
}
Returns
The return value is a tag attributes of an if set, or undefined.
Example usage
// Example usage.
import { Tag } from '@angular-package/text';
// Create tag [quote].
const tag = new Tag(`quote`, `<`, `>`, ['color', 'red']);
// Returns
Tag.prototype.closingTag
public get closingTag(): ClosingTag<Name, Opening, Closing> {
return `${this.#wrapper.opening}/${this.#name}${
this.#wrapper.closing
}`;
}
Returns
Example usage
// Example usage.
import { Tag } from '@angular-package/text';
// Create tag [quote].
const tag = new Tag(`quote`);
// Returns [/quote].
tag.closingTag;
Tag.prototype.name
public get name(): Name {
return this.#name;
}
Returns
Example usage
// Example usage.
import { Tag } from '@angular-package/text';
// Create tag [quote].
const tag = new Tag(`quote`);
// Returns quote.
tag.name;
Tag.prototype.openingTag
public get openingTag(): OpeningTag<Name, Chars> {
return this.tag as OpeningTag<Name, Chars>;
}
Returns
Example usage
// Example usage.
import { Tag } from '@angular-package/text';
// Create tag <span color="red">.
const tag = new Tag(`span`, `<`, `>`, ['color', 'red']);
// Returns <span color="red">.
tag.openingTag;
Tag.prototype.tag
public get tag(): `${Opening}${Name}${Closing}` {
return `${this.#wrapper.opening}${this.#name}${
this.#wrapper.closing
}`;
}
Returns
Example usage
// Example usage.
import { Tag } from '@angular-package/text';
// Create tag [quote].
const tag = new Tag(`quote`);
// Returns [quote].
tag.tag;
Tag.prototype.wrapper
ppublic get wrapper(): Wrapper<Opening, Closing> {
return this.#wrapper;
}
Returns
Example usage
// Example usage.
import { Tag } from '@angular-package/text';
// Create tag [quote].
const tag = new Tag(`quote`);
// Returns Wrapper {'[]'}.
tag.wrapper;
Tag.prototype.value
public get value(): string {
return this.valueOf();
}
Returns
Example usage
// Example usage.
import { Tag } from '@angular-package/text';
// Create tag [quote].
const tag = new Tag(`quote`);
// Returns [quote].
tag.value;
[Symbol.toStringTag]
Good to know: The property can be read by the typeOf() function of the type package.
public get [Symbol.toStringTag](): 'tag' {
return 'tag';
}
Example usage
// Example usage.
import { Tag } from '@angular-package/text';
import { typeOf } from '@angular-package/type';
// Define the tag.
const quoteTag = new Tag('quote');
// Returns 'tag'.
typeOf(quoteTag);
The accessor gets the of a generic type .
The return value is a tag closing of a generic type .
The accessor gets the tag name without the wrap from the private property .
The return value is a tag name of a generic type variables .
The accessor gets tag with optional attributes.
The return value is an opening tag of a generic type .
The accessor gets the tag consists of the name, opening and closing of the wrap.
The return value is a tag of a generic type variables in order , and on the template.
The accessor gets the wrapper.
The return value is the instance.
The accessor gets the tag without the attributes.
The return value is the tag of a generic type variables in order , and on the template.
The property, with the help of of Symbol, changes the default object tag to tag for an instance of the .