In order to add records, you need to go through several steps including generating the event, capturing it in your parent template, and writing the methods to perform the addition. Learn how to do that in this video.
- [Instructor] Let's work on the code…for submitting an appointment by filling out this form.…You're in for a treat,…'cause Angular makes it super simple.…And we'll start out in the app.module…by importing something else from the library…called the FormsModule.…(keyboard clicking)…Right, once I import it,…I need to also import it right here as well.…
And I'm going to save that.…And now I can easily add some form submission features…into our add.component.html.…So let's make this a little bit bigger.…Alright, the way this is going to work…is that what you want is any input field…that you want to store or keep track of…as somebody fills it out,…you want to make sure that it has a name attribute,…like this, like this one has a name of petName.…And let's do a search,…and we'll do a search for name equals quotation.…
And you can see that all the fields that I want…to keep track of, have a name attribute,…like any form element that you want to control should.…So all I need to do is at the end of this…I'm going to a directive called ngModel.…
- Building custom Angular projects
- Working with subcomponents
- Adding icons
- Adding search functionality
- Using lifecycle methods
- Managing list data
- Indexing your data
- Updating records
Skill Level Intermediate
Using the exercise files1m 43s
1. Building Custom Angular Projects
2. Working with Subcomponents
3. Creating More Subcomponents
Managing form submission8m 33s
4. Managing List Data
Next steps1m 8s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.