{"id":18712886,"url":"https://github.com/mrsteele/ng-alerts","last_synced_at":"2025-04-12T11:54:14.585Z","repository":{"id":58230840,"uuid":"47432146","full_name":"mrsteele/ng-alerts","owner":"mrsteele","description":"An angular extension to house notifications","archived":false,"fork":false,"pushed_at":"2017-05-02T14:21:16.000Z","size":117,"stargazers_count":5,"open_issues_count":11,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-24T07:45:25.782Z","etag":null,"topics":["alert","angular-extension","bootstrap","count","notifications","popover"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrsteele.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-04T22:33:30.000Z","updated_at":"2018-10-05T13:17:25.000Z","dependencies_parsed_at":"2022-08-31T03:30:09.048Z","dependency_job_id":null,"html_url":"https://github.com/mrsteele/ng-alerts","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsteele%2Fng-alerts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsteele%2Fng-alerts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsteele%2Fng-alerts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsteele%2Fng-alerts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrsteele","download_url":"https://codeload.github.com/mrsteele/ng-alerts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565052,"owners_count":21125415,"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":["alert","angular-extension","bootstrap","count","notifications","popover"],"created_at":"2024-11-07T12:44:13.871Z","updated_at":"2025-04-12T11:54:14.567Z","avatar_url":"https://github.com/mrsteele.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ng-alerts\n\nAn angular extension to manager front-end notifications and alerts.\n\n### Status\n\n[![dependency Status](https://david-dm.org/mrsteele/ng-alerts.svg)](https://david-dm.org/mrsteele/ng-alerts#info=dependencies)\n[![devDependency Status](https://david-dm.org/mrsteele/ng-alerts/dev-status.svg)](https://david-dm.org/mrsteele/ng-alerts#info=devDependencies)\n\n## About\n\nLIVE DEMO: http://mrsteele.github.io/ng-alerts/\n\nI made this plugin in an attempt to manage any and all user-faces notifications and alerts. I wanted it clean, extensible, and scalable.\n\n## Prerequisites\n\nOnly a few prerequisites to use this plugin (a prereq's prereqs listed as well).\n\n* AngularJS\n* Angular-UI Bootstrap\n    * Bootstrap\n\n## Installation\n\n### Node\n\n```\nnpn install ng-alerts --save\n```\n\n### Bower\n\n```\nbower install ng-alerts --save\n```\n\nng-alerts is made to be flexible for the benefit of the developer. Mix and match whatever systems you want to achieve whatever you would like!.\n\nIf you want to see a quick example, just open */test/index.html* and that will let you know what to expect, otherwise read the information below.\n\nFirst, you must include the module name in your dependencies list.\n\n```javascript\nvar testApp = angular.module('testApp', [\n    'ngAlerts'\n]);\n```\n\nng-alerts will now be installed for you to use throughout your application. You can configure a few defaults of the application with the provider.\n\n```javascript\ntestApp.config(['ngAlertsProvider', function (ngAlertsProvider) {\n    // Global empty list text.\n    ngAlertsProvider.options.emptyListText = 'Nothing here...';\n    \n    // The queue timeout for new alerts.\n    ngAlertsProvider.options.queueTimeout = 3000;\n    \n    // The queue location (top||bottom, left||right).\n    ngAlertsProvider.options.queueLocation = 'bottom left';\n}]);\n```\n\nIt is recommended you interface through **ngAlertsMngr** to add your alerts. Use the *add* function to add an alert. The first argument is the message, and the seciond one (optional) is the type (defaults to \"warning\" but any of the bootstrap types are valid).\n```javascript\ntestApp.controller('TestCtrl', function ($scope, ngAlertsMngr) {\n    $scope.createAlert = function () {\n        ngAlertsMngr.add('testing', 'warning');\n    };\n});\n```\n\nUsing the **add** function will add a notification and update all directives throughout your application.\n\n## Directives\n\n### ng-alerts-count\n\nUse this to display the current count of notifications.\n\n* **badge** - Set this attribute to \"true\" if you want it to take on the appearance of a bade.\n* **hide-empty** - Set this to \"true\" if you want to completely remove the text if you have \"zero\" alerts.\n\n#### Example\n```html\n\u003cng-alerts-count badge=\"true\" hide-empty=\"true\"\u003e\u003c/ng-alerts-count\u003e\n```\n\n### ng-alerts-list\n\nDisplays a list of alerts, with the ability to remove them.\n* **empty-text** - Overrides the default empty list text.\n\n#### Example\n```html\n\u003cng-alerts-list empty-text=\"No alerts available\"\u003e\u003c/ng-alerts-list\u003e\n```\n\n### ng-alerts-popover\n\nAttaches to an element (button, a, etc...) and creates a click handler for displaying ```ng-alerts-list``` in a popover. This one uses the backbone popover directive, so all popover attributes are applicable. See https://angular-ui.github.io/bootstrap/#/popover.\n\n#### Example\n```html\n\u003cbutton ng-alerts-popover popover-placement=\"left\"\u003e\u003c/button\u003e\n```\n\n## Can I contribute?\n\nYES! Pull requests welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsteele%2Fng-alerts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrsteele%2Fng-alerts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsteele%2Fng-alerts/lists"}