ngx-json-ui
Version:
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.0.
25 lines (24 loc) • 1.06 kB
TypeScript
import { Observable } from 'rxjs';
import { Notification } from '../models/notification.model';
import * as i0 from "@angular/core";
/**
* Centralized service to manage in-app notifications.
* Components can subscribe to `notifications$` to display messages.
*/
export declare class NotificationService {
private notificationSubject;
/** Stream of notifications to display */
readonly notifications$: Observable<Notification>;
/** Emit a success notification */
showSuccess(message: string, duration?: number): void;
/** Emit an error notification */
showError(message: string, duration?: number): void;
/** Emit an info notification */
showInfo(message: string, duration?: number): void;
/** Emit a warning notification */
showWarning(message: string, duration?: number): void;
/** Internal helper to push a notification into the stream */
private notify;
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<NotificationService>;
}