How kazepis/ngx-toaster-next works
ngx-toaster-next is an Angular toast-notification library. The main workflow is an application invoking a severity method on ToastService; the service applies configuration and duplicate/SSR checks, records the toast, and creates a host that renders accessible, dismissible toast views. Configuration providers and the sample app are included as distinct supporting capabilities. The sampled source shows these runtime relationships; other README capabilities are represented where their implementation path is clear from the tree.
Main entry points: toast.service.ts Toast service · public-api.ts Library exports · toast-config.ts Config model · toast-host.component.ts Overlay host
Components 12
Public API
- Library exports
projects/ngx-toaster-next/src/public-api.ts
Toast Runtime
- Toast service
projects/ngx-toaster-next/src/lib/toast.service.ts - Toast store
projects/ngx-toaster-next/src/lib/toast-store.ts - Overlay host
projects/ngx-toaster-next/src/lib/toast-host.component.ts - Toast view
projects/ngx-toaster-next/src/lib/toast.component.ts - Toast styles
projects/ngx-toaster-next/src/lib/toaster.css
Configuration
- Config model
projects/ngx-toaster-next/src/lib/toast-config.ts - Config provider
projects/ngx-toaster-next/src/lib/toasts.providers.ts
Demo Application
- Sample bootstrap
projects/ngx-toaster-next-sample-app/src/main.ts - Sample defaults
projects/ngx-toaster-next-sample-app/src/app/app.config.ts - Toast demo
projects/ngx-toaster-next-sample-app/src/app/app.ts
Other components
- Angular app
Connections 18
- Angular app → Library exports: imports API
README.md - Angular app → Toast service: invokes
README.md - Library exports → Toast service: exports
projects/ngx-toaster-next/src/public-api.ts - Library exports → Config provider: exports
projects/ngx-toaster-next/src/public-api.ts - Library exports → Config model: exports
projects/ngx-toaster-next/src/public-api.ts - Toast service → Config model: resolves settings
projects/ngx-toaster-next/src/lib/toast.service.ts - Toast service → Toast store: checks and adds
projects/ngx-toaster-next/src/lib/toast.service.ts - Toast service → Overlay host: creates host
projects/ngx-toaster-next/src/lib/toast.service.ts - Overlay host → Toast store: reads toasts
projects/ngx-toaster-next/src/lib/toast-host.component.ts - Overlay host → Toast view: renders
projects/ngx-toaster-next/src/lib/toast-host.component.ts - Toast view → Toast store: dismisses toast
projects/ngx-toaster-next/src/lib/toast-host.component.ts - Config provider → Config model: merges defaults
projects/ngx-toaster-next/src/lib/toasts.providers.ts - Sample bootstrap → Sample defaults: bootstraps with
projects/ngx-toaster-next-sample-app/src/main.ts - Sample bootstrap → Toast demo: bootstraps
projects/ngx-toaster-next-sample-app/src/main.ts - Sample defaults → Config provider: registers defaults
projects/ngx-toaster-next-sample-app/src/app/app.config.ts - Toast demo → Toast service: calls severity API
projects/ngx-toaster-next-sample-app/src/app/app.ts - Toast demo → Config model: reads live config
projects/ngx-toaster-next-sample-app/src/app/app.ts - Angular app → Toast styles: includes stylesheet
README.md