From the course: Angular: Building an Interface
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Controlling sorting - Angular Tutorial
From the course: Angular: Building an Interface
Controlling sorting
- [Instructor] So it's time to make our drop-downs actually do something here. Now, this is going to be pretty familiar. To do that, we're going to create and track an event whenever you click on one of these. And then that's going to generate a local event that gets pushed through the parent component's HTML into our main component. And so we've been doing that all along, so this will be great practice. And we'll start out by making this bigger. And so we'll go to the search-component, which has that drop-down. And let's just move this app-component over here in my editor just so that I have things kind of more together. So we'll go back here to search-component and I'm going to start out just sort of moving these things to the next line. Usually, my style, when I'm programming in Angular, is to break things down into their own line if they're long enough and then also, as I mentioned before, I try to put, like, the Angular commands at the very end. So let's go ahead and we're going…