How do you include partial views in EJS templates?
- <%- include('partial') %>
- <% include('partial') %>
- <% partial('partial') %>
- <%- partial('partial') %>
In EJS, you can include partial views using the <%- include('partial') %> syntax. This allows you to reuse and insert content from other EJS files into your main template, helping you create modular and maintainable views. The other options are not the correct syntax for including partials in EJS.
Loading...
Related Quiz
- Which of the following is an appropriate use case for using a NoSQL database over a SQL database?
- The aud claim in a JWT token represents the ________ for which the JWT is intended.
- How does the switch statement compare the switch expression with the case expressions in JavaScript?
- How can you use the fs module to copy a file from one location to another?
- How can you match routes with a specific pattern in Express.js?