Example:
I have content page in route “/product”. I want to render two component in this page.
First component on “/product” route and second is “/product/addProduct”. I use a navbar to change the route. I am changing the route internally in NODEJS. How do I render a partial based on routes ?
No, I want two partials within a single content page for different routes.
example
for “/product” == I get the content page with a partial of list of cards .
and for “/product/addproduct” == I should get a partial with a form in it. This should all take place with the single content page.
Partials are not really meant to be used this way.
You need two content pages loaded in your layout - one containing your list of items and another one containing a form.
Partials are used for reusing data like - header/footer across multiple pages. You can’t load partials in the routes as in your screenshots above.