diff --git a/README.md b/README.md index 5e355e6..bb6d754 100644 --- a/README.md +++ b/README.md @@ -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.