Answers for "display data node.js on ejs file"

11

add one file to another in ejs

<%- include('partials/messages'); %>
Posted by: Guest on October-31-2020
-1

using server passed values and client js together in ejs

<% var test = 101; %> // variable created by ejs
 <script>
   var getTest = <%= test  %>;  //var test is now assigned to getTest which will only work on browsers
   console.log(getTest);  // successfully prints 101 on browser
</script>
Posted by: Guest on May-25-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language