0

I tried to find the solution of my question "What is template engine for Javascript ?", but i wasn't able to find an simple answer. Can anyone tell me the answer of this question?

Thanks in advance

1 Answers1

0

"engine" is a stupid word for it. it's just a way to write HTML from javascript, with some "brains" so it could be written like HTML but you could mix it up with javascript logic and do loops and checks and whatever..inject dynamic javascript content..you get the point.

Plenty on this on this website - How to use underscore.js as a template engine?

Community
  • 1
  • 1
vsync
  • 118,978
  • 58
  • 307
  • 400
  • SO is it like implementing some readymade code for what you want to do? – Abhishek Saini Aug 04 '14 at 11:56
  • lets say you have a "to-do" list, where someone inputs an item to the list. so, you gonna write an HTML template file, so javascript would know the markup of how an item of this list looks like, and them fill it up with data. so, you give "brains" to your HTML, it would now know what data should go where, instead of hard-coding HTML using javascript strings, and then inject it to the page. – vsync Aug 04 '14 at 11:59