The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Introduction to ng-messages for AngularJS

Introduction to ng-messages for AngularJS

4:13
ng-messages is a directive added in AngularJS 1.3 that is used to display messages to the user. This is usually in relation to form error messages, and cleans up the syntax required to show feedback messages to the user.
Watch this lesson now
Avatar
egghead.io

ng-messages is a directive added in AngularJS 1.3 that is used to display messages to the user. This is usually in relation to form error messages, and cleans up the syntax required to show feedback messages to the user.

Avatar
Paul

I see ng-model is a requirement on the input to get messages working. Not quite sure how it works though. It seems arbitrary as to what the model is, e.g. ng-model="foo" works equally as well as ng-model="inputname". Could you explain the binding here?

In reply to egghead.io
Avatar
Kent C.

Hi Paul,
Here are the docs for ng-model. It's a fundamental directive for model-to-form binding in Angular: https://docs.angularjs.org/api/ng/directive/ngModel

In reply to Paul
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?