Skip to main content
Use the <stackone-hub> custom element from @stackone/hub in any Angular template.
1

Install the package

2

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:
3

Register the element at app entry

The import is side-effecting — it registers <stackone-hub> on customElements.
4

Get a session token from your backend

5

Add the element and listen for events

Bind attributes with [attr.name] and subscribe to events with addEventListener via @ViewChild:

Attribute reference

All scalar StackOneHub 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 DOM CustomEvents on the element: Angular’s (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.