You create your html components and use the reUseMl script to render them to your html document
For your simple usage of ReUSe dowload from Here
Create a directory of
/componentsand store all your markup components , For small projects you can have your styling in your html using<style></style>tags
Add the
reUse.jsfile or minifiedreUse.min.jsto html code, then also create another javascript file where you call the render method
<script src='reUse.min.js'></script>
<script src='app.js'></script>
In your
app.js, if you want to render aheader.htmlcomponent into your container with an Id of#headerYou instantiate reuse from ReUseMl(), then set the views or directory where it'll search for your components, using thereuse.set()methodconst reuse = new ReUseMl(); reuse.set('./components)
reuse.render('header.html', '#header');
Check here for an example using the library or clone repo and open
Distributed under the MIT license. See LICENSE for more information

