angular2-notifications
- Version 16.0.1
- Published
- 244 kB
- 1 dependency
- MIT license
Install
npm i angular2-notifications
yarn add angular2-notifications
pnpm add angular2-notifications
Overview
> A light and easy to use notifications library for Angular 2. ~~It features both regular page notifications (toasts) and push notifications.~~
Index
Variables
variable OPTIONS
const OPTIONS: InjectionToken<Options>;
Functions
function optionsFactory
optionsFactory: (options: any) => any;
Classes
class NotificationComponent
class NotificationComponent implements OnInit, OnDestroy {}
constructor
constructor( notificationService: NotificationsService, domSanitizer: DomSanitizer, cd: ChangeDetectorRef, zone: NgZone);
property animate
animate: NotificationAnimationType;
property clickIconToClose
clickIconToClose: boolean;
property clickToClose
clickToClose: boolean;
property content
content: any;
property contentIsTemplate
contentIsTemplate: boolean;
property htmlIsTemplate
htmlIsTemplate: boolean;
property item
item: Notification;
property maxLength
maxLength: number;
property ɵcmp
static ɵcmp: i0.ɵɵComponentDeclaration< NotificationComponent, 'simple-notification', never, { timeOut: { alias: 'timeOut'; required: false }; showProgressBar: { alias: 'showProgressBar'; required: false }; pauseOnHover: { alias: 'pauseOnHover'; required: false }; clickToClose: { alias: 'clickToClose'; required: false }; clickIconToClose: { alias: 'clickIconToClose'; required: false }; maxLength: { alias: 'maxLength'; required: false }; theClass: { alias: 'theClass'; required: false }; rtl: { alias: 'rtl'; required: false }; animate: { alias: 'animate'; required: false }; position: { alias: 'position'; required: false }; item: { alias: 'item'; required: false }; }, {}, never, never, false, never>;
property ɵfac
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationComponent, never>;
property pauseOnHover
pauseOnHover: boolean;
property position
position: number;
property progressWidth
progressWidth: number;
property rtl
rtl: boolean;
property safeInputHtml
safeInputHtml: SafeHtml;
property safeSvg
safeSvg: SafeHtml;
property showProgressBar
showProgressBar: boolean;
property theClass
theClass: string;
property timeOut
timeOut: number;
property title
title: any;
property titleIsTemplate
titleIsTemplate: boolean;
method attachOverrides
attachOverrides: () => void;
method ngOnDestroy
ngOnDestroy: () => void;
method ngOnInit
ngOnInit: () => void;
method onClick
onClick: (event: MouseEvent) => void;
method onClickIcon
onClickIcon: (event: MouseEvent) => void;
method onEnter
onEnter: () => void;
method onLeave
onLeave: () => void;
method startTimeOut
startTimeOut: () => void;
class NotificationsService
class NotificationsService {}
constructor
constructor(globalOptions: any);
property emitter
emitter: Subject<NotificationEvent>;
property globalOptions
globalOptions: any;
property icons
icons: Icons;
property ɵfac
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationsService, never>;
property ɵprov
static ɵprov: i0.ɵɵInjectableDeclaration<NotificationsService>;
method alert
alert: ( title?: any, content?: any, override?: any, context?: any) => Notification;
method bare
bare: ( title?: any, content?: any, override?: any, context?: any) => Notification;
method create
create: ( title?: any, content?: any, type?: NotificationType, override?: any, context?: any) => Notification;
method error
error: ( title?: any, content?: any, override?: any, context?: any) => Notification;
method html
html: ( html: any, type?: NotificationType, override?: any, icon?: string, context?: any) => Notification;
method info
info: ( title?: any, content?: any, override?: any, context?: any) => Notification;
method remove
remove: (id?: string) => void;
method set
set: (notification: Notification, to: boolean) => Notification;
method success
success: ( title?: any, content?: any, override?: any, context?: any) => Notification;
method warn
warn: ( title?: any, content?: any, override?: any, context?: any) => Notification;
class SimpleNotificationsComponent
class SimpleNotificationsComponent implements OnInit, OnDestroy {}
constructor
constructor(service: NotificationsService, cd: ChangeDetectorRef);
property animate
animate: NotificationAnimationType;
property clickIconToClose
clickIconToClose: boolean;
property clickToClose
clickToClose: boolean;
property create
create: EventEmitter<any>;
property destroy
destroy: EventEmitter<any>;
property maxLength
maxLength: number;
property notifications
notifications: Notification[];
property ɵcmp
static ɵcmp: i0.ɵɵComponentDeclaration< SimpleNotificationsComponent, 'simple-notifications', never, { options: { alias: 'options'; required: false } }, { create: 'create'; destroy: 'destroy' }, never, never, false, never>;
property ɵfac
static ɵfac: i0.ɵɵFactoryDeclaration<SimpleNotificationsComponent, never>;
property pauseOnHover
pauseOnHover: boolean;
property position
position: Position;
property rtl
rtl: boolean;
property showProgressBar
showProgressBar: boolean;
property theClass
theClass: string;
property timeOut
timeOut: number;
method add
add: (item: Notification) => void;
method attachChanges
attachChanges: (options: any) => void;
method block
block: (item: Notification) => boolean;
method buildEmit
buildEmit: (notification: Notification, to: boolean) => Notification;
method checkHtml
checkHtml: (checker: Notification, item: Notification) => boolean;
method checkStandard
checkStandard: (checker: Notification, item: Notification) => boolean;
method cleanSingle
cleanSingle: (id: string) => void;
method defaultBehavior
defaultBehavior: (value: any) => void;
method ngOnDestroy
ngOnDestroy: () => void;
method ngOnInit
ngOnInit: () => void;
class SimpleNotificationsModule
class SimpleNotificationsModule {}
property ɵfac
static ɵfac: i0.ɵɵFactoryDeclaration<SimpleNotificationsModule, never>;
property ɵinj
static ɵinj: i0.ɵɵInjectorDeclaration<SimpleNotificationsModule>;
property ɵmod
static ɵmod: i0.ɵɵNgModuleDeclaration< SimpleNotificationsModule, [typeof i1.SimpleNotificationsComponent, typeof i2.NotificationComponent], [any], [typeof i1.SimpleNotificationsComponent]>;
method forRoot
static forRoot: ( options?: Options) => ModuleWithProviders<SimpleNotificationsModule>;
Interfaces
interface Icons
interface Icons {}
interface Notification
interface Notification {}
property animate
animate?: NotificationAnimationType;
property click
click?: EventEmitter<{}>;
property clickIcon
clickIcon?: EventEmitter<{}>;
property clickIconToClose
clickIconToClose?: boolean;
property clickToClose
clickToClose?: boolean;
property content
content?: any;
property context
context?: any;
property createdOn
createdOn?: Date;
property destroyedOn
destroyedOn?: Date;
property html
html?: any;
property icon
icon: string;
property id
id?: string;
property maxLength
maxLength?: number;
property override
override?: any;
property pauseOnHover
pauseOnHover?: boolean;
property state
state?: string;
property theClass
theClass?: string;
property timeOut
timeOut?: number;
property timeoutEnd
timeoutEnd?: EventEmitter<{}>;
property title
title?: any;
property type
type: NotificationType;
interface NotificationEvent
interface NotificationEvent {}
property add
add?: boolean;
property command
command: string;
property id
id?: string;
property notification
notification?: Notification;
interface Options
interface Options {}
property animate
animate?: NotificationAnimationType;
property clickIconToClose
clickIconToClose?: boolean;
property clickToClose
clickToClose?: boolean;
property icons
icons?: Icons;
property lastOnBottom
lastOnBottom?: boolean;
property maxLength
maxLength?: number;
property maxStack
maxStack?: number;
property pauseOnHover
pauseOnHover?: boolean;
property position
position?: Position;
property preventDuplicates
preventDuplicates?: boolean;
property preventLastDuplicates
preventLastDuplicates?: boolean | string;
property rtl
rtl?: boolean;
property showProgressBar
showProgressBar?: boolean;
property theClass
theClass?: string;
property timeOut
timeOut?: number;
Enums
enum NotificationAnimationType
enum NotificationAnimationType { Fade = 'fade', FromTop = 'fromTop', FromRight = 'fromRight', FromBottom = 'fromBottom', FromLeft = 'fromLeft', Scale = 'scale', Rotate = 'rotate',}
enum NotificationType
enum NotificationType { Success = 'success', Error = 'error', Alert = 'alert', Info = 'info', Warn = 'warn', Bare = 'bare',}
Type Aliases
type HorizontalPosition
type HorizontalPosition = 'right' | 'left' | 'center';
type VerticalPosition
type VerticalPosition = 'top' | 'bottom' | 'middle';
Package Files (11)
- index.d.ts
- lib/components/notification/notification.component.d.ts
- lib/components/simple-notifications/simple-notifications.component.d.ts
- lib/enums/notification-animation-type.enum.d.ts
- lib/enums/notification-type.enum.d.ts
- lib/interfaces/icons.d.ts
- lib/interfaces/notification-event.type.d.ts
- lib/interfaces/notification.type.d.ts
- lib/interfaces/options.type.d.ts
- lib/services/notifications.service.d.ts
- lib/simple-notifications.module.d.ts
Dependencies (1)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/angular2-notifications
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/angular2-notifications)
- HTML<a href="https://www.jsdocs.io/package/angular2-notifications"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2667 ms. - Missing or incorrect documentation? Open an issue for this package.