2.0.15 • Published 9 years ago

mi-angular-alert-service v2.0.15

Weekly downloads
10
License
MIT
Repository
github
Last release
9 years ago

Angular Alert Service

GitHub version npm version npm downloads Build Status Coverage Status dependency Status devDependency Status License

Alert Service for AngularJS.

A customizable alert service for AngularJS apps.

Installation

Install with npm

$ npm i mi-angular-alert-service --save

Usage

Attention, the integration of bootstrap is required for the example ...

# app.js
require('angular-bootstrap');
require('mi-angular-alert-service');
var requires = [
  'ui.bootstrap',
  'mi.AlertService'
];
angular.module('sample-app', requires)
  // defaults for alert service
  .constant('ALERT_LEVELS', {
    danger: {timeout: 10000},
    warning: {timeout: 5000},
    success: {timeout: 3000},
    info: {timeout: 3000}
  })
;
angular.bootstrap(document, ['sample-app']);
# index.html
<div class="global-alerts" ng-cloak>
    <div alert ng-repeat="alert in alerts" type="{{alert.type}}" close="alert.close()">{{alert.msg}}</div>
</div>

Tests

Trigger unit test with npm

$ npm run test

Travis and npmjs

Every push will trigger a test run at travis-ci (node.js-versions: 0.10, 0.12, 4.0, 4.1, 4.2 and 4.3). In case of a tagged version and success (node.js 4.3) an automated pbulish to npmjs.org will be triggered by travis-ci.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

This library is under the MIT license.

2.0.15

9 years ago

2.0.14

9 years ago

2.0.13

9 years ago

2.0.12

9 years ago

2.0.10

10 years ago

2.0.9

10 years ago

2.0.8

10 years ago

2.0.7

10 years ago

2.0.6

10 years ago

2.0.4

10 years ago

2.0.5

10 years ago

2.0.3

10 years ago

2.0.2

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago