(live demo)
HTML Template EngineInclude other files into your current file:
<!-- Include other html files into your own -->
Instalation
- Using NPM
$ npm install html-template-engine --save
- Or using a simple script tag before your body closing tag and use the autoload feature to avoid using any Javascript whatsoever.
Important! Please notice the ?autoload at the end of the script url, here is the library code
Usage (Remember to install the library first)
On your HTML paste the following code whenever you want to include another html file
<!-- Include other html files into your own --> <!-- You can also include svg files -->
Only for NPM installations:
; //if you want to load the templates when the website finishes loadingwindow{ TemplateManagerstart; }
Additional Available Params
- Log on the console all the pieces being loaded into the html
- Set a base template path for all your url's
...
Authors
Alejandro Sanchez | @alesanchezr | alesanchezr.com |
---|