reading-notes

View on GitHub

EJS Partials

EJS Partials used for reusing the same HTML across multiple views . Use pace of html code as function that you can edit it easily anytime . Partials has ejs extension You should put partials files in views folder After define new Partials files , we can use them in any EJS page . To use new Partials put Partials url between <% %>

` <%- include(‘partials/navbar’) %> `

Usually we convert parts that are repeated more than once into EJS Partials that can be added later in more than one place or even on more than one page.