In AngularJS ngMessages directive is used to display messages within templates (typically within forms). Instead of relying on JavaScript code and/or complex ng-if statements, the ngMessages and ngMessage directives are constructed to handle the complexity, inheritance and priority sequencing based on the order of how the messages are defined in the template.
Currently, only ngMessages, ngMessagesInclude ngMessage and ngMessageExp directives are supported.
Here is a list of AngularJS built in message directives with description.
Directives | Description |
---|---|
ngMessage | It is used to show and hide messages based on the state of a key/value object that it listens on. |
ngMessageExp | It is used to show and hide a particular message. |
ngMessages | It is used to show and hide a particular message. |
ngMessagesInclude | It is used to import existing ngMessage template code from a remote location. |