{"id":13674119,"url":"https://github.com/ng-parth/notifyMe","last_synced_at":"2025-04-28T14:30:38.095Z","repository":{"id":58224563,"uuid":"88521979","full_name":"ng-parth/notifyMe","owner":"ng-parth","description":"notifyMe is a angular 1.x module which can be used to show notification messages within a SPA. You can check the demo at","archived":false,"fork":false,"pushed_at":"2017-05-05T09:57:29.000Z","size":553,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-19T09:54:17.565Z","etag":null,"topics":["angular","notification-message","notifications","notifyme","spa"],"latest_commit_sha":null,"homepage":"https://ng-parth.github.io/notifyMe/","language":"JavaScript","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/ng-parth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-17T15:28:35.000Z","updated_at":"2017-05-08T05:23:27.000Z","dependencies_parsed_at":"2022-08-31T02:00:56.649Z","dependency_job_id":null,"html_url":"https://github.com/ng-parth/notifyMe","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-parth%2FnotifyMe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-parth%2FnotifyMe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-parth%2FnotifyMe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-parth%2FnotifyMe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ng-parth","download_url":"https://codeload.github.com/ng-parth/notifyMe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251330118,"owners_count":21572230,"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","notification-message","notifications","notifyme","spa"],"created_at":"2024-08-02T11:00:41.271Z","updated_at":"2025-04-28T14:30:37.486Z","avatar_url":"https://github.com/ng-parth.png","language":"JavaScript","funding_links":[],"categories":["UI Components"],"sub_categories":["Notification"],"readme":"# notifyMe\n\n**notifyMe** is a angular 1.x module which can be used to show notification messages within a SPA. The notifications will be used to display information which give the user a feedback, but do not disturb them at the current work.\nThe notification will appear on top right side of the screen.\n\n## Demo\nYou can check the demo at [https://ng-parth.github.io/notifyMe/](https://ng-parth.github.io/notifyMe/)\n\n## Installation\n\nUse bower to add this package:\n```\n$ bower install notify-me --save\n```\n## Usage\nnotify-me is very simple to use. It comes with three types of notification messages:\n```js\n// Display an info notification\nnotifyMe.ofInfo('Hello world! This is a info notification message.', 'Info notification title');\n```\n![alt text](img/notifyMe.ofInfo.png \"Info notification\")\n```js\n// Display warning notification\nnotifyMe.ofWarning('Warning: Cigarette smoking is injurious to health.', 'Hazardous warning');\n```\n![alt text](img/notifyMe.ofWarning.png \"Warning notification\")\n```js\n// Display an error notification\nnotifyMe.ofError('Array index out of bound.', 'Erroneous code!');\n```\n![alt text](img/notifyMe.ofError.png \"Error notification\")\n\n## Generate and access docs for notifyMe\nSupport for documentation is added using [ngDocs (built on Dgeni)](https://github.com/angular/angular.js/wiki/Writing-AngularJS-Documentation). So you can follow the comment style given there and generate the documentation.\n  The documantation is also available at [https://ng-parth.github.io/notifyMe/docs](https://ng-parth.github.io/notifyMe/docs)\n\nAltenatively, to generate the docs:\n```\nnpm install -g gulp\nnpm install\ngulp buildDocs\ngulp runDocs\n```\nand then open http://localhost:8083 in your browser to access the notifyMe docs.\n\n## Running Tests\nTo execute all the test, use:\n```\ngulp test\n```\n\n## Customization notifications\nIf you want to customise notification, you can do it by modifying `notifyMeConfig` in config of your angular app:\n\n```javascript\napp.config(function(notifyMeConfig) {\n  angular.extend(notifyMeConfig, {\n        timeout: 90000,\n        maxNotif: 5,\n        containerId: 'notify-me-container',\n        type: {\n            info: {\n                closeable: true,\n                autoDismiss: true\n            },\n            error: {\n                closeable: true,\n                autoDismiss: false\n            },\n            warning: {\n                closeable: true,\n                autoDismiss: false\n            }\n        }\n  });\n});\n```\n\nYou can override the above defaults with your values.\n\n* **timeout** Delay in ms after which the notification auto-dismisses.\n* **maxNotif**: Maximum number of notification that can be opened at once.\n* **containerId**: The id of the notification container which will be appended to body to show notification.\n* **type.closeable**: This property set the weather the notification of this particular type will be closeable or not.\n* **type.autoDismiss**: This property set the weather the notification of this particular type will be auto-dismissed or not.\n\n\n## APIs:\nFollowing are the APIs which you can use in your project after injecting this module in your angular application.\n\n**Notification class**\nNotification is a class with following properties.\n- `notifId` : Unique id for this notification.\n- `type` : Type of notification\n- `message` : Notification message\n- `title` : Notification title\n- `close` : Close function to dismiss the notification\n- `options` : Notification options\n\n    **options**\n    The options contains key-value pairs for customizing the notification. It can accept only following keys.\n    - `closeable` : boolean | default: true. This option controls weather you want the notification closeable ot not\n    - `autoDismiss` :  boolean | default: false. This option controls weather the notification will be auto-dismissed.\n    - `timeout` : time in ms | default: 90000. This options set the timespan after which the the notification will be auto-dismissed.\n    - *NOTE:* `autoDismiss` and `timeout` both are required to auto-dismiss notification. If `timeout` is set to 0, it will set the delay to infinity, so that notification wont be auto-dismissed.\n\n**Info notification:**\n`notifyMe.ofInfo(msg, title, [options(optional)]);`\nreturns `notificationObj`\n\n**Warning notification:**\n`notifyMe.ofWarning(msg, title, [options(optional)]);`\nreturns `notificationObj`\n\n**Error notification:**\n`notifyMe.ofError(msg, title, [options(optional)]);`\nreturns `notificationObj`\n\n**Clear all notification:**\n`notifyMe.clear([notificationObj(optional)]);`\n\n\n### Close Button\n\nThe cross on top right corner of notification will dismiss the current notification.\nThis is available in all types of notifications. Customise using `closeable` params in `options` while triggering the notification.\n\n### Auto-dismiss/Timeouts\nAt present, only `info` notification are dismissed automatically after 90000ms.\nThis can be customised by overriding the timeout parameter in config file.\nThis can also be customised using `timeout` and `autoDismiss` params in options while triggering the notifications.\nINFO and ERROR notification can also be made autodismissable by setting `autoDismiss` property to `true` in options while creating notification.\n   *Note:* Setting `timeout` to 0 with `autoDismiss` to `true` will dismiss the notification automatically.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fng-parth%2FnotifyMe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fng-parth%2FnotifyMe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fng-parth%2FnotifyMe/lists"}