Skip to content

Instantly share code, notes, and snippets.

@BlaShadow
Created November 25, 2013 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BlaShadow/7640941 to your computer and use it in GitHub Desktop.
Save BlaShadow/7640941 to your computer and use it in GitHub Desktop.
Template bing {{ value :) }}
var bindTemaplte = function(template,data)
{
for(key in data)
{
var reg = new RegExp('{{ ' + key + ' }}','g');
template = template.replace(reg,data[key]);
}
return template;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment