Project is deprecated. No continue development, no bugfixing anymore.
lx-angular-alert provides a service with a directive to display information to the user. For this, a box will be temporarily displayed in the UI. On the methods and parameters of the service can be controlled content and appearance of the alarm box.
- angular-bootstrap
$ bower install lx-angular-alert
example.js
angular.module('app', ['ui.bootstrap', 'lx.alert'])
.controller('DemoCtrl', function ($scope, $lxAlert) {
$scope.lxAlert = $lxAlert;
$scope.showAlert = function(type) {
$scope.lxAlert[type]('Info message from controller');
};
});
example.html
<div ng-controller="DemoCtrl">
<h1>Demo</h1>
<lx-alert service="lxAlert"></lx-alert>
<div class='btn-group'>
<button class='btn btn-default' ng-click="showAlert('info')">Info-Alert</button>
<button class='btn btn-default' ng-click="showAlert('success')">Success-Alert</button>
<button class='btn btn-default' ng-click="showAlert('warning')">Warning-Alert</button>
<button class='btn btn-default' ng-click="showAlert('danger')">Danger-Alert</button>
</div>
</div>
Service for angular-ui alert handling which shows different alert boxes in an application.
Method | Param | Type | Details |
---|---|---|---|
info | message | string | Provides a simple note to the information of the user. |
success | message | string | Delivers a message for the successful completion of a process. |
warning | message | string | Delivers a striking warning. |
danger | message | string | Provides a alarm message for heavier errors. |
close | Hides the message box again. |
The message parameter contains the message to be displayed.
Markup for alert. It is the place holder which contains the DOM-content to show alert messages.
Param | Type | Details |
---|---|---|
service | $lxAlert | Holds the lxAlert factory |
as element:
<lx-alert service="lxAlert"></lx-alert>
$ npm install -g grunt-cli bower
$ grunt test
$ grunt cover
$ grunt ci
You can run the karma test through webstorm. Just create a new karma run configuration and choose the config file test/karma.webstorm.conf.js
.
Instead of us handing out a formal style guide, simply stick to the existing programming style. Please create descriptive commit messages. We use a git hook to validate the commit messages against these rules. Easily expand Baboon with your own extensions or changes in the functionality of Baboon itself. Use this workflow:
- Write your functionality
- Write unit tests for your functionality
- Create an example of your functionality in the sample application (optional)
- Document your functionality in the documentation section of example app
- Write unit tests for the example
- Add end to end tests for the example
- All tests should be successful
- Check your test coverage (90 - 100%)
- Make a pull request
We will check the tests, the example and test coverage. In case your changes are useful and well tested, we will merge your requests.
We use grunt-bump and grunt-conventional-changelog internally to manage our releases.
To handle the workflow, we created a grunt task release
. This happens:
- Bump version in package.json
- Update the CHANGELOG.md file
- Commit in git with message "chore: release v[
the new version number
]" - Create a git tag v[
the new version number
]
Release a new patch
$ grunt release
Release a new minor version
$ grunt release:minor
Release a new major version
$ grunt release:major
Copyright (c) 2014 Litixsoft GmbH Licensed under the MIT license.