With the release of AngularJS 1.3, we get some handy additions to forms, including a submitted state and the ability to bind input field names to an expression.
[00:01] Angular 1.3 does a couple of interesting things to forms. The first, a form has a submitted state. If we see down here, myForm.$submitted is false. In our markup, we have myForm, which is bound to that name on the scope and $submitted. This $submitted is new.
[00:20] If I go up here, say, "Hello," and then submit, you can see now that this submitted is now true. One other thing that I think is key is now this name property is interpolatable. It can be interpolated. It's passed through the parser before myField is attached to the myForm on the scope.
[00:44] We can say, "fieldName." Actually, let's put that on the view model. Good practice there. viewModel.fieldName equals myField. Now, everything works great. These are welcome changes to forms.
Member comments are a way for members to communicate, interact, and ask questions about a lesson.
The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io
Be on-Topic
Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.
Avoid meta-discussion
Code Problems?
Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context
Details and Context
Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!