marcorinck / angular-growl

growl-like notifications for angularJS projects
MIT License
478 stars 191 forks source link

Inject variables in growl server message #19

Open rorymadden opened 10 years ago

rorymadden commented 10 years ago

This pull requests adds a '_messageVariableKey' which allows you to inject variables in the server messages.

E.g. if a field is required the message could be:

{
  messages: [{
    text: "{{field}} is a required field",
    variables: {
      field: 'First Name'
    }]
}