0

I am searching for a client-side template engine for plain HTML pages. I am not talking about single DIV's in the page, I'm talking about the full page.

Say I have a simple webapp, with a menu, and 100 menu entries. So, there are in fact 100 different pages (100 different webapps!), and I want different urls for them:

http://mysite/myapp/page1.html
...
http://mysite/myapp/page100.html

Now, the 100 pages share a common layout (a menu bar, a header, a footer, and the whole HTML head), and I don't want to cut-and-paste them 100 times, it's absolutely wrong. I want to keep template tiles in different files, and to merge them with some client-side JS framework.

I have looked to AngularJS and to Handlebar.js, but I cannot see a simple way to do this. You always have to write tons of code.

Old technologies (FRAME's and IFRAME's) are deprecated, IMHO.

So, my question is, what are the possible solutions?

I think this is a common task, however I cannot find a clear answer.

Please notice this is a very simple task if performed server-side (with PHP, JSP, or whatever).

luca.vercelli
  • 898
  • 7
  • 24
  • Do you wanna use only Angular JS or can you use jQuery as well? – Praveen Kumar Purushothaman Jul 13 '17 at 07:37
  • To make things simple, you could just use plain Javascript. Get the data from the server, and load it in your template and show it. If you want to go single page app, I would recommend React, since it has lower learning curve then Angular. – Amiga500 Jul 13 '17 at 07:39
  • To achieve your requirement any how you have to write no of lines no matter what JS framework you use.It completely depends on your choice.If you are going with AngularJs it would be pretty simple to create a SPA and you can hold lot of other features to accomplish your other requirements as well. – Namdeo Karande Jul 13 '17 at 07:50
  • If possible, I prefer AngularJs, because there are lot of other features. – luca.vercelli Jul 13 '17 at 11:43

0 Answers0