- Overview
- Transcript
6.7 Adding the View Application Markup
When the user clicks on the View Applications button next to a lawn in the View Lawn component, this will navigate the user to a new page of the app and display all of the products that have been applied to the lawn.
1.Introduction2 lessons, 07:21
1.1Introduction01:02
1.2Prerequisites06:19
2.Getting Started3 lessons, 30:48
2.1Creating the App Structure11:46
2.2Creating the Server-Side Entry Point10:14
2.3Starting the Angular and Express Apps08:48
3.Setting Up the Mongo Database4 lessons, 27:53
3.1Getting MongoDB Up and Running06:08
3.2Connecting to MongoDB06:47
3.3Creating the Database Schema07:49
3.4Creating a Simple Data Access Layer07:09
4.Creating an API With Express6 lessons, 29:16
4.1Handling Requests in Express09:57
4.2Taking Advantage of the Express Router05:52
4.3Adding the `GET` Handler to the API05:34
4.4Adding the `POST` Handler to the API03:18
4.5Adding the `PUT` Handler to the API02:17
4.6Adding the `DELETE` Handler to the API02:18
5.Building the Front-End Angular App6 lessons, 45:52
5.1Creating the Front-End Models06:57
5.2Creating an Angular Service07:31
5.3Making HTTP Requests From the Service08:33
5.4Setting Up the User Interface09:05
5.5Creating All the Components05:28
5.6Adding Routing to the App08:18
6.Creating the App Components12 lessons, 1:00:02
6.1Adding the View Lawn Markup05:55
6.2Adding the View Lawn Code06:51
6.3Adding the Add Lawn Markup04:34
6.4Adding the Add Lawn Code07:41
6.5Adding the Edit Lawn Markup03:06
6.6Adding the Edit Lawn Code04:11
6.7Adding the View Application Markup02:54
6.8Adding the View Application Code07:46
6.9Adding the Add Application Markup02:16
6.10Adding the Add Application Code04:49
6.11Adding the Edit Application Markup04:20
6.12Adding the Edit Application Code05:39
7.Conclusion1 lesson, 03:18
7.1Conclusion03:18
6.7 Adding the View Application Markup
Now to the point where we can start dig a little bit deeper and take advantage of the routing that we've added into our application previously. So if we were to take a look at where we are right now, we now can create and manage the lawns. But now we wanna be able to do the same thing for the applications of products that we put on the lawns. So if you see now, when we click on View Applications for each of these individual lawns, we're gonna get to the next page where we can see view-application works, and obviously that's not what we want. We wanna be able to see more information and we wanna be able to get the actual data. So what we're gonna do now is we're going to modify the view-application component and the HTML. So once again, we're gonna dump in some code here. It's gonna be quite a bit, but it's gonna be once again strikingly similar to what we did previously. So I'm gonna go through these a little bit quicker now, because you will more familiar with them since you've already kind of seen something similar. So now this time we're going to have a header and we're going to take in this long title. And we're gonna call it the, whatever title. So if it's home it will be Home Lawn Applications. And then we're going to have another button up here, so we can go ahead and add an application. And then we're gonna have table-striped, so we're gonna have all the same kind of table that we've had before. The properties or the column names that we're gonna be dealing with are gonna be date, name and amount in pounds. So how many pounds of fertilizer? How many pounds of whatever it is we put into the lawn? And then we're gonna have some information about each one of those. So it's gonna have the date that we did it, and then the name of the product that we put down, and you can add to this as much as you want. You could talk about macronutrients and all sorts of crazy stuff that you're putting in the lawn, but I kept this rather generic, so we could have something simplistic to look at. And then, we're gonna have something similar to what we've done before. So we had the edit and we had the delete as well, as far as the applications are concerned on the lawn. So we can edit them if we didn't type them in correctly. We can delete them as well. And then we have similar modals at the bottom, as we've seen before. So one thing that we're gonna kinda have to work on right away is gonna be this concept of the lawn. So what lawn are we gonna be dealing with here? And how we gonna know what that is? Well, we're gonna kind of get to that. So it's gonna be one of those individual lawn service calls. But we'll go ahead and save this right now and see what we get. So if we come over here once we've saved it and refresh and we click View Applications, we're going to get an error over here and that's okay. Because we really don't have that lawn in there yet, so it doesn't know what applications are and so on and so forth. So it's not able to really output some of the things we want it to. But at least we'll be able to see kind of the basic structure as to what this is gonna look like. So that in the next lesson and in the upcoming lessons we can start to augment this with some code. And really start to give this a little bit of shape.







