You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well, I am trying to use the include(path) method of ejs in my project it doesn't work and the paranthesis of include are printed with the path in the error
but when i changed it to include path it works,
now i want to use include(path, {variable: value})
this doesn't work and they are printing 'path , {variable: value}' as the path of file
i am attaching screenshots of the code that's working and of the code that's not please help me!!
i need help with giving the parameters in include method as ive given in screenshots
from the above images you can see if i add paranthesis to my include method the path doesn't get rendered and is printed the same what's written with the parantheis and double qoutes
but if i remove the paranthesis and double qoutes it's getting rendered correctly for the normal usage of include method i.e <%- include path %>
but the one with the parameter i am passing path is not getting rendered correctly
i.e <%- include ../includes/add-to-cart , {product:product} %>
i tried <%- include("../includes/add-to-cart", {product: product}) %>
from the official website's refrence and the github readme refrence but it's still not working as you can see in the screenshots
Please help me i am still learning node js so i don't know much!!!!
The text was updated successfully, but these errors were encountered:
Well, I am trying to use the include(path) method of ejs in my project it doesn't work and the paranthesis of include are printed with the path in the error
but when i changed it to include path it works,
now i want to use include(path, {variable: value})
this doesn't work and they are printing 'path , {variable: value}' as the path of file
i am attaching screenshots of the code that's working and of the code that's not please help me!!
i need help with giving the parameters in include method as ive given in screenshots
from the above images you can see if i add paranthesis to my include method the path doesn't get rendered and is printed the same what's written with the parantheis and double qoutes
but if i remove the paranthesis and double qoutes it's getting rendered correctly for the normal usage of include method i.e <%- include path %>
but the one with the parameter i am passing path is not getting rendered correctly
i.e <%- include ../includes/add-to-cart , {product:product} %>
i tried <%- include("../includes/add-to-cart", {product: product}) %>
from the official website's refrence and the github readme refrence but it's still not working as you can see in the screenshots
Please help me i am still learning node js so i don't know much!!!!
The text was updated successfully, but these errors were encountered: