From the course: Mastering Nest.js: Build Scalable Applications with Mastery in Nest.js Framework
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Creating "add product" interface - Nest.js Tutorial
From the course: Mastering Nest.js: Build Scalable Applications with Mastery in Nest.js Framework
Creating "add product" interface
Now, we are going to create the ad product interface. I have opened the adproduct.ejs file. Inside the body, I will remove the h1 and will give scriptlet include and the navbar path that is dot slash includes slash navbar dot ejs. By this, the navbar will be displayed in the ad product page as well. I'll also apply the bootstrap CDN link. Let me copy it from the home EJS and paste it here in the head section. Let's open the ad product page in the browser and the navbar is getting displayed. Now we are going to create a form which will have feeds like product name, price and image. So back to the code, I'll define a division with classes. I'll say div class ContainerFluidMt5. Inside the division, I will give a form tag. We'll say class W25. Action is equal to slash my store slash add product, which is the add product route and method attribute as post. Now inside the form, I'll give an H2 and the text add product. Below the heading, I'll define a container division with class form…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Introduction to MyStore application2m 43s
-
(Locked)
Rendering template on server4m 41s
-
(Locked)
Creating navbar with "includes"3m 31s
-
(Locked)
Creating home interface9m 6s
-
(Locked)
Conditional rendering: No product found2m 26s
-
(Locked)
Configuring add product route2m 29s
-
(Locked)
Creating "add product" interface5m 51s
-
(Locked)
Configuring edit product route1m 49s
-
(Locked)
Interface & functionality: Edit product4m 10s
-
(Locked)
-
-
-
-