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.

Configuring edit product route

Configuring edit product route

Now, let's start working on the edit product page and route. We have already created the edit product template, so let's just render it. I'll open the app controller file and define the get route handler, setting the path as edit product and a method that is render edit product page, which returns null. Then I'll render the edit product template. Now inside the home EJS file, where we have defined the anchor for edit product, I'll give the href slash my store slash edit product. Let's save and check the browser. We have opened the home page. Let me click on edit option. And here we go. We are redirected to the edit product template, which you can see in the route path. Now let's also display the navbar inside the edit product page. I'll open the edit product template and inside the body, I'll give the scriptlet include the path dot slash includes slash navbar dot ejs. And let's also place the bootstrap CD and links from the home EJS template inside the edit product page. Let's save…

Contents