{ "id": "api/elements", "title": "@angular/elements", "contents": "\n\n
\n
\n
\n \n API\n
\n \n
\n \n
\n

@angular/elementslink

\n \n \n \n \n
\n\n \n\n
\n

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

\n\n

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.

\n

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

\n

For more information, see Angular Elements Overview.

\n\n\n \n\n\n \n

Entry pointslink

\n \n \n \n
\n

Primarylink

\n \n \n \n \n \n \n \n
@angular/elements\n \n

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

\n\n
\n
\n \n\n \n \n \n\n \n\n

Primary entry point exportslink

\n \n \n \n \n \n\n \n \n \n
\n

Classeslink

\n \n \n \n \n \n \n \n
NgElement\n \n

Implements the functionality needed for a custom element.

\n\n
\n
\n \n\n \n \n \n\n \n \n \n
\n

Functionslink

\n \n \n \n \n \n \n \n
createCustomElement\n \n

Creates a custom element class based on an Angular component.

\n\n
\n
\n \n\n \n \n \n
\n

Structureslink

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NgElementConfig\n \n

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

\n\n
NgElementConstructor\n \n

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

\n\n
NgElementStrategy\n \n

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

\n\n
NgElementStrategyEvent\n \n

Interface for the events emitted through the NgElementStrategy.

\n\n
NgElementStrategyFactory\n \n

Factory used to create new strategies for each NgElement instance.

\n\n
\n
\n \n\n \n \n \n\n \n \n \n\n \n \n \n
\n

Typeslink

\n \n \n \n \n \n \n \n
WithProperties\n \n

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

\n\n
\n
\n \n\n
\n
\n\n\n" }