IONIC Section 7 - 7.5 Creation of our application pages
Click here for more videos available on our youtube channel !Hello everyone, with regard to this project, I will therefore continue with the previous one concerning the recipes. But you can of course create a new one with the command you know “ionic start”. If you want follow me, we will start by getting rid of our “recipes” folder which is no longer of any use. And then we will generate new pages and of course we have to adjust the routing as we go. So let's start by generating our pages which we can do with the "ionic generate page" command, and we will put "auth" of course, we need a lot of pages, this will be the page we will see when we start the application. We can therefore run this command, which gives us our new “auth” folder and will add that of root to the file “app-routing.module.ts”. Speaking of which, we can remove all that recipe routing here. Note that, depending on the version of Ionic you are using, what was generated in the routing file might look like this. We see that the syntax of "loadChildren" has changed a bit. Instead of having a long string here, you now have this function, which in its body, calls the import function then points to the module in order to be imported into class like this. So you can keep this syntax that I recommend you keep. We will enter “ionic generate page places” which will be the area where we can see all the places we can book as well as suggest new places and so what we want to have here is certainly a page of places that will fit later in our tree. So we repeat the same command by adding the under “/discover” folder, in other words, it is the page that allows you to search or find new pages. Then, we can generate another page with “/offers” where users can offer places. As I indicated, we need to be able to create a new offer so another subfolder here in the places/offers/new-offer area which will be the page rendering the new offers as in a dashboard which will now be generated inside the “offers” folder in which we find the “new-offer” sub-folder and it is essentially there that we will be able to enter the data for a new place we can offer. We can also modify our offers, so we will add a page in entering “ionic generate page places/offers/edit-offer”. So we're done with the offers for now, but in "places", we do have our "discover" sub-folder and the ideal would be to generate a page where we can see all the places we can book with “ionic generate page places/discover/place-detail”. With all of our pages, we are able to find places, what we lack is the booking part. Both reservations for the places we have offered as well as our own reservations now for the places we have offered. We will therefore enter “ionic generate page places/offers/offer-bookings”, offer reservations will therefore be a page from which we can access our offers page but we also have the reservations that we have made ourselves and which will now be related to places because they are not nested at this place, this is why we are going to generate a “bookings” page. And here we are, we have generated all the pages necessary for our application, you can rely on previous explanatory videos, detailing the usefulness of each page to fully understand the architecture of this app. As for us, we meet in the next video to configure our routing.