Created
November 25, 2013 13:07
-
-
Save BlaShadow/7640941 to your computer and use it in GitHub Desktop.
Template bing {{ value :) }}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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