Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nsanta committed Dec 20, 2013
1 parent 30506f1 commit 20983e6
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions README.md
Expand Up @@ -8,19 +8,28 @@ Features:

Usage:

- ng-notice: EAC. When is used as attribute you can use the value for name the element
- $flash: provides the notify function. You can pass up to three params: level, message, element.
notify also emits the event "event:ngNotification".
Directive:

Example:
ng-notice: EAC. When is used as attribute you can use the value for name the element

Factory:

$flash(options): used for show the notifications inside of ng-notice elements

http://jsfiddle.net/nsanta/K8JYD/13/
options for flash: object with next properties

- element: the box that you want to display the message
- level: the message level. It is used for add a class to the message box
- message: the message text
- methods: prepend (prepend the message to the box), append (append the message to the box) and insert (replace the notification)
- before: a function callback. The parameter passed to the function is the element. Runs before the text is attached the box
- after: a function callback. The parameter passed to the function is the element. Runs after the text is attached the box


Example:

Roadmap:
See the example folder.

- send the notification data direct to the event
- notify: pass the notification callback as parameter
- better specs
- better documentation
License:

MIT.

0 comments on commit 20983e6

Please sign in to comment.