9
I’m having trouble making a Javascript function that I pass a string and an object and it fills this string with the attributes of that object, for example:
var user = {
nome: "danilo",
idade: 29
};
var a = "Meu nome é ${nome}, e tenho ${idade} anos";
This plugin does just what you are trying to implement: http://www.jsviews.com
– Tobias Mesquita
did not want to add another plugin in the project to accomplish something so simple, even so thank you.
– Danilo Thiago
I understand, until pq Jsviews will only be really useful if you need to create a more complex template, conditions, loops, complex templates, etc.
– Tobias Mesquita