AttributeDecorator
属性装饰器/构造函数的类型。
Type of the Attribute decorator / constructor function.
interface AttributeDecorator {
(name: string): any
new (name: string): Attribute
}
方法
指令构造函数的参数修饰器,用于指定宿主元素属性,其值作为常量字符串文字注入。 Parameter decorator for a directive constructor that designates a host-element attribute whose value is injected as a constant string literal. |
使用说明假设我们有一个 Suppose we have an
以下示例使用装饰器将字符串文字 The following example uses the decorator to inject the string literal
The following example uses the decorator in a component constructor.
|