Monday, 29 October 2018

Mustache is not defined error in node js : Uncaught error

I want to render the pages on the client side with Mustache.js but it says Mustache is not defined. I found an answer here but it's difficult to understand as i just started learning about websites/rendering etc. In order to learn i need to fix this issue but i have no clue how can i do that.

Can someone tell me what do i need to do to fix it without going into much details as i am a beginner in scripting languages.

Here is my code: I am trying to open a new page and then simple render it.

socket.on('sign-up-succes',(data) => {
  window.open(data.redirect,"_self");
  var template = jQuery('#message-template').html();
  var html = Mustache.render(template,{
    text : "Hello"
   });
  jQuery('#messages').append(html);
});



from Mustache is not defined error in node js : Uncaught error

No comments:

Post a Comment