javascript - how write text/template in a file and include it to project -
i utilize script type="text/template" project , utilize lot of templates, want write template in foreign file , include html
if possible , type of file must utilize , how must write ?
in pure javascript/html environment, can't easily.
your choices are:
use kind of javascript template library
i'm familiar durandal uses knockout engine.
angularjs seems popular choice.
most of these packages include far more templates , may overkill.
use server-side template package
php popular server-side tool.
some http servers back upwards server side includes, these limited couldn't recommend them.
javascript jquery html texttemplate
No comments:
Post a Comment