totaljs / Tangular

A simple JavaScript template engine like Angular.js for websites or node.js
MIT License
61 stars 21 forks source link

Tangular.render is not working #15

Open lcnvdl opened 3 years ago

lcnvdl commented 3 years ago

Hi! I have installed Tangular 4.0.0.

When I do this:

const Tangular = require("tangular");

Tangular.render("{{template}}", {template:"Ok"});

The application throws the next exception:

Tangular.render is not a function

Now, when I install Tangular ^2.0.1, it works fine!

What am I doing wrong?

petersirka commented 3 years ago

Hi, I updated a bit behaviour for Tangular and I forgot to update documentation.

require('tangular');
// Library registers "Tangular" and "Thelpers" as a global variable

// Now Tangular.render(), Tangular.compile() will work:
Tangular.render();

Thank you for the report.