HTML Templates in Javascript? Without coding in the page?

后端 未结 12 1383
暗喜
暗喜 2020-12-04 18:32

I am a web guy doing mostly Perl server-side stuff, and I\'m slowly coming to a few conclusions.

  • It is far better to do most of your code via Javascript and t
12条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-04 19:01

    What about JAML Code?

    http://github.com/edspencer/jaml

    Similar to a few of the above but I believe is a bit more logical...

    It is the concept of defining your templates via JSON / JavaScript and then using a function in JavaScript to pass arguments to your template which gets it rendered and returned as an element.

    There are implementations around for the various JavaScript Frameworks that exist.

提交回复
热议问题