{"id":13729273,"url":"https://github.com/stanvanheumen/ngx-notifications","last_synced_at":"2025-10-06T22:14:41.265Z","repository":{"id":57162430,"uuid":"123583132","full_name":"stanvanheumen/ngx-notifications","owner":"stanvanheumen","description":"A simple library that allows you to notify your users in your Angular 5+ app.","archived":false,"fork":false,"pushed_at":"2018-10-05T08:08:56.000Z","size":77,"stargazers_count":11,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-08T01:37:10.667Z","etag":null,"topics":["angular","angular-library","angular-universal","aot-compatible","observables","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stanvanheumen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-02T13:35:44.000Z","updated_at":"2021-04-24T16:29:33.000Z","dependencies_parsed_at":"2022-09-10T09:02:40.272Z","dependency_job_id":null,"html_url":"https://github.com/stanvanheumen/ngx-notifications","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stanvanheumen%2Fngx-notifications","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stanvanheumen%2Fngx-notifications/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stanvanheumen%2Fngx-notifications/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stanvanheumen%2Fngx-notifications/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stanvanheumen","download_url":"https://codeload.github.com/stanvanheumen/ngx-notifications/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254436903,"owners_count":22070949,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular-library","angular-universal","aot-compatible","observables","typescript"],"created_at":"2024-08-03T02:00:57.723Z","updated_at":"2025-10-06T22:14:36.232Z","avatar_url":"https://github.com/stanvanheumen.png","language":"TypeScript","funding_links":[],"categories":["UI Components"],"sub_categories":["Notification"],"readme":"# `ngx-notifications`\nA simple library that allows you to notify your users in your Angular 5+ app.\n\n- Use \u003ckbd\u003ecommand\u003c/kbd\u003e + \u003ckbd\u003eF\u003c/kbd\u003e or \u003ckbd\u003ectrl\u003c/kbd\u003e + \u003ckbd\u003eF\u003c/kbd\u003e to search for a keyword.\n- Contributions welcome, please see [contribution guide](.github/CONTRIBUTING.md).\n\n## Features\n\n- :camel: **Easy implementation**\n- :mouse: **Lazy loading compatible**\n- :sheep: **Angular Universal compatible**\n- :bird: **Ahead-Of-Time compilation compatible**\n- :monkey: **Automatic support for multiple languages**\n\n## Demo\n\n[Click here to play with the example](https://stackblitz.com/github/stanvanheumen/ngx-notifications)\n\n## Installation\n\nTo use ngx-notifications in your project install it via `npm` or `yarn`:\n\n```bash\n# To get the latest stable version in dependencies\n\n$ npm install @stanvanheumen/ngx-notifications --save\n\n# Or\n\n$ yarn add @stanvanheumen/ngx-notifications\n```\n\n## Setup\n\nTo get the correct fonts and icons you should add these two link-tags to the `head` section of your `index.html` (these are not included for performance).\n\n```html\n\u003clink href=\"https://fonts.googleapis.com/icon?family=Material+Icons\" rel=\"stylesheet\"\u003e\n\u003clink href=\"https://fonts.googleapis.com/css?family=Roboto:400,500,700\" rel=\"stylesheet\"\u003e\n```\n\nImport the `NgxNotificationsModule` in your AppModule and call the `forRoot()` method to receive a singleton of the `NotificationsService`.\n\n```typescript\nimport {BrowserAnimationsModule} from '@angular/platform-browser/animations';\nimport {NgxNotificationsModule} from '@stanvanheumen/ngx-notifications';\nimport {NgxTranslationsModule} from '@stanvanheumen/ngx-translations';\n\n@NgModule({\n    imports: [\n        BrowserAnimationsModule, // or NoopAnimationsModule.\n        NgxNotificationsModule.forRoot(),\n        NgxTranslationsModule.forRoot(...) // Optional.\n    ]\n})\nexport class AppModule {}\n```\n\n## Example\n\nAdd the `\u003cngx-notifications-list\u003e\u003c/ngx-notifications-list\u003e` to your `AppComponent`. This will be the place where the \nnotifications will be shown.\n\n```typescript\nimport {NotificationsService} from '@stanvanheumen/ngx-notifications';\nimport {Component, OnInit} from '@angular/core';\n\n@Component({\n    selector: 'app-root',\n    template: `\n        \u003cngx-notifications-list\u003e\u003c/ngx-notifications-list\u003e\n    `\n})\nexport class AppComponent implements OnInit {\n\n    constructor(private notifications: NotificationsService) {\n    }\n    \n    ngOnInit() {\n        this.notifications.success('Something went really good!');\n        this.notifications.error('Something went really bad!');\n        this.notifications.warn('I want to warn you about something!');\n        this.notifications.info('Just some relevant information.');\n    }\n\n}\n```\n\n## Options\n\n### Notification\n\n| Property          | Type                           | Required          | Description                                                                      |\n| ----------------- | ------------------------------ | ----------------- | -------------------------------------------------------------------------------- |\n| title             | string                         | false             | The title of the notification. (it's default is based on the type)               |\n| text              | string                         | true              | The text of the notification.                                                    |\n| type              | NotificationType               | true              | The type of the notification.                                                    |\n| timeout           | number                         | false             | The time (in ms) that the notification will stay on the screen (default 4000ms). |\n| icon              | string                         | false             | The icon of the notification. (it's default is based on the type)                |\n\n### Notification types\n\n| Enum              |\n| ----------------- |\n| Success           |\n| Error             |\n| Warning           |\n| Info              |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstanvanheumen%2Fngx-notifications","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstanvanheumen%2Fngx-notifications","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstanvanheumen%2Fngx-notifications/lists"}