Implements the functionality needed for a custom element.
属性
| 属性名 | 类型 | 说明 |
|---|
| ngElementStrategy | | The strategy that controls how a component is transformed in a custom element. |
| ngElementEventsSubscription | | A subscription to change, connect, and disconnect events in the custom element. |
方法
attributeChangedCallback() |
|---|
Prototype for a handler that responds to a change in an observed attribute. |
abstract attributeChangedCallback(attrName: string, oldValue: string | null, newValue: string, namespace?: string): void参数| attrName | The name of the attribute that has changed. | | oldValue | The previous value of the attribute. | | newValue | The new value of the attribute. | | namespace | The namespace in which the attribute is defined. 可选. 默认值是 undefined. |
返回值void: Nothing.
|
|
|---|
Prototype for a handler that responds to the insertion of the custom element in the DOM. |
abstract connectedCallback(): void参数没有参数。 返回值void: Nothing.
|
|
|---|
Prototype for a handler that responds to the deletion of the custom element from the DOM. |
abstract disconnectedCallback(): void参数没有参数。 返回值void: Nothing.
|