AttributeDecorator
interface
Type of the Attribute decorator / constructor function.
interface AttributeDecorator {
(name: string): any
new (name: string): Attribute
}
Methods
|
call signature | |||
|---|---|---|---|
| Parameter decorator for a directive constructor that designates a host-element attribute whose value is injected as a constant string literal. | |||
(name: string): anyParameters
Returns
| |||
Usage NotesSuppose we have an
The following example uses the decorator to inject the string literal
The following example uses the decorator in a component constructor.
|
|
construct signature | |||
|---|---|---|---|
new (name: string): AttributeParameters
Returns
|
© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/core/AttributeDecorator