<stackone-hub> custom element from @stackone/hub in any Angular template.
Allow custom elements in your component
Add
CUSTOM_ELEMENTS_SCHEMA to the component (or module) that uses <stackone-hub> so Angular accepts unknown tags as custom elements:Register the element at app entry
The import is side-effecting — it registers
<stackone-hub> on customElements.Attribute reference
All scalarStackOneHub props map to kebab-case HTML attributes — see the vanilla guide for the full table. Bind them with [attr.name]="value" to keep them as attributes rather than Angular property bindings.
Events
Native DOMCustomEvents on the element:
| Event | event.detail |
|---|---|
success | { id: string; provider: string } |
close | undefined |
(event) template binding does fire on native DOM CustomEvents, so (success)="onSuccess($event)" works. We use addEventListener via @ViewChild here for explicit teardown in ngOnDestroy.
Next steps
Backend setup
Generate session tokens from your backend.
Filter connectors
Restrict the Hub to a single provider or category.