lrNotifier is a notification module for Angularjs. It is lightweight and very simple (less 75 lines of code) and has no dependency on any third party library other than angular framework itself. you can easily customise your notification template and define different channels on the application.
include the module in your application.
Use the directive in your markup to define a container for a given notification channel and the template of your notifications
Then anywhere in your application (directive, controller, service) push notification on you channel using one the following methods
note the level is also used to assign a class to the notification so you can easily change the style with css
life cycle of a notification
Once a notification has been pushed, the user will be able to remove it from the stack by clicking on it. Otherwise it will disappear by itself after 3s.
You can change the time at configuration phase, using the provider
If you are using angular >= 1.2.0 you can use animation as for any ng-repeat directive.
The class name of the items is
You can run unit test using Karma
karma start karma.conf.js
Before submitting a pull request make sure: *the change keep the code simple *to add test for your 'new feature' *all tests are passing *to update documentation
Copyright (C) 2013 Laurent Renard.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.