Skip to main content

@notifizz/angular SDK reference

@notifizz/angular ships a standalone Angular component (<notifizz-bell>) and an injectable NotifizzService exposing the widget state as an RxJS observable. Use it from any Angular 17+ app.

TL;DR

  • <notifizz-bell [options]="..." /> — drop-in standalone component that renders the bell + dropdown.
  • NotifizzService — inject anywhere for programmatic control (open(), close(), toggle(), state$).
  • Three auth modes via authType: 'firebase', 'backendToken', 'none' (dev-only).
  • Replace the default bell with content projection (#customBellIcon) — works with any Angular template or component.
  • Web push opt-in is headless: notifizz.webpushOptIn() plus the reactive webpushStatus$ let you own the button.

Installation

NotifizzAngularComponent

A standalone component that renders the bell icon and the notification center. Use the notifizz-bell selector in your template.

Basic usage

Inputs

Outputs

Reactive state

The component exposes a state$ observable:

NotifizzOptions

authType: "none" example (dev only)

authType: "none" ships unauthenticated widget access — anyone with the apiKey can read any user’s inbox. Use it for local development only. Production must use firebase or backendToken.

Custom bell icon

Replace the default bell using Angular content projection. Use the #customBellIcon template reference:
You can use any HTML element or Angular component — just add the #customBellIcon reference.

NotifizzService

An injectable service for programmatic control of the widget from anywhere in your application — outside the template.

Properties

Methods

Programmatic initialisation

Skip the component and drive the widget purely via the service:

Web push opt-in

Closed beta. Web push is enabled per organisation and is off by default. Until it is switched on for yours, no campaign can take a push step — so an opt-in collected here would have nothing to deliver. Ask your Notifizz contact to switch it on. Campaigns that already carry a push step keep sending either way.
The opt-in is headless: no bell required, no Notifizz UI. You own the button and its timing, and webpushStatus$ tells you when to show it.
Call webpushOptIn() from a real click. A permission request that isn’t tied to a user gesture is ignored by the browser, and some browsers penalise the site for asking. Full channel behaviour is in web push.

Internal services

These services are used internally by NotifizzService. You typically don’t need them unless you’re building advanced integrations or custom state management.

NotifizzStateService

Manages the internal state. Useful if you need fine-grained control over state updates.

NotifizzCommandService

Sends commands to the widget. Used internally by NotifizzService.

State shape

NotifizzState (delivered through state$, onStateChange, the stateChange output):

Exported types

FAQ

NotifizzAngularComponent is standalone but importable into any module via imports: [NotifizzAngularComponent]. The same applies if you migrate part of an existing NgModule app to standalone. The NotifizzService is provided in 'root' and works in both setups.
The widget is browser-only. On the server, NotifizzAngularComponent renders an empty mount <div> and the service no-ops. Hydration on the client triggers script loading and authentication. SSR works without extra config.
They shouldn’t — NotifizzService is provided in 'root', so every injection sees the same state$ BehaviorSubject. If you see drift, you have probably re-provided the service at the component level (providers: [NotifizzService]), creating a separate instance. Remove the local provider.
Yes. The widget can publish a state update for the cached getState result before the ready event fires (e.g. unreadCount from the previous session). Always gate UI on state.isReady === true if you need post-auth state.
Update notifizzOptions.userId / notifizzOptions.token and call notifizz.destroy() then notifizz.init(...) from the service. The component does not currently re-authenticate on [options] change in place — destroy + re-init is the safe path.
Make sure the projected element has the #customBellIcon template reference variable. The component listens for clicks on the element matching that reference; without it, your icon renders but the click handler never wires up.

See also

Notification Center overview

Lifecycle, state model, positioning, custom bell.

Authentication overview

Pick the right widget auth mode.

Frontend quickstart

Get the widget rendering in under five minutes.

Backend quickstart

Send the events the widget will display.