From the course: Building Applications with Angular, ASP.NET Core, and Entity Framework Core

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

New question functionality

New question functionality

From the course: Building Applications with Angular, ASP.NET Core, and Entity Framework Core

Start my 1-month free trial

New question functionality

- [Instructor] In this video, we'll add some functionality to our question form. We'll begin by adding a button and binding to it's click event. So inside our editor, in our question component, we'll load the html and we'll add a button. We could add the button to our form element, but the card has an actions element that can be used specifically for buttons, so we'll use that. If we go back to the Angular Materials Components under Card and Examples, we can see this example with the main content and then buttons at the bottom. If we look at the code, we can see that the buttons are placed inside an md-card actions element and the content is placed an md-card content element. So let's replicate that in ours. We'll put our form inside an md-card-content element and then below that we'll add an md-card-actions. Then let's add our button. I'll call it POST, since we'll be posting a new question. Let's take a look. Since the button won't be in our form element, we won't bind to it through…

Contents