@angular/elements

package

Implements Angular's custom-element API, which enables you to package components as custom elements.

A custom element extends HTML by allowing you to define a tag whose content is created and controlled by JavaScript code. The browser maintains a CustomElementRegistry of defined custom elements (also called Web Components), which maps an instantiable JavaScript class to an HTML tag.

The createCustomElement() function provides a bridge from Angular's component interface and change detection functionality to the built-in DOM API.

For more information, see Angular Elements Overview.

Entry points

Primary

@angular/elements

Implements Angular's custom-element API, which enables you to package components as custom elements.

Primary entry point exports

Classes

NgElement

Implements the functionality needed for a custom element.

Functions

createCustomElement

Creates a custom element class based on an Angular component.

Structures

NgElementConfig

A configuration that initializes an NgElementConstructor with the dependencies and strategy it needs to transform a component into a custom element class.

NgElementConstructor

Prototype for a class constructor based on an Angular component that can be used for custom element registration. Implemented and returned by the createCustomElement() function.

NgElementStrategy

Underlying strategy used by the NgElement to create/destroy the component and react to input changes.

NgElementStrategyEvent

Interface for the events emitted through the NgElementStrategy.

NgElementStrategyFactory

Factory used to create new strategies for each NgElement instance.

Types

WithProperties

Additional type information that can be added to the NgElement class, for properties that are added based on the inputs and methods of the underlying component.

© 2010–2019 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v6.angular.io/api/elements