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

NgElementConstructorlink

\n \n \n \n \n \n
\n \n \n\n
\n \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 \n
\n \n \n
\n\ninterface NgElementConstructor<P> {\n observedAttributes: string[]\n new (injector?: Injector): NgElement & WithProperties<P>\n}\n\n\n \n \n\n\n \n \n\n
\n\n \n
\n

See alsolink

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

Propertieslink

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
PropertyDescription
\n \n observedAttributes: string[]\n Read-Only\n \n

An array of observed attribute names for the custom element,\nderived by transforming input property names from the source component.

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

Methodslink

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

\n construct signature\n \n link

\n \n
\n
\n

Initializes a constructor instance.

\n\n
\n
\n \n\n new (injector?: Injector): NgElement & WithProperties<P>\n\n \n\n
Parameters
\n \n \n \n \n \n \n \n \n \n
\n \n injector\n Injector\n

If provided, overrides the configured injector.

\n

Optional. Default is undefined.

\n\n
\n\n \n
Returns
\n

NgElement & WithProperties<P>

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