zoukankan      html  css  js  c++  java
  • handlerbar.js

    handlerbar.js

    Handlebars templates 像普通的html, 嵌入式的 handlebars 表达式.

    <div class="entry">
      <h1>{{title}}</h1>
      <div class="body">
        {{body}}
      </div>
    </div>

    你可以用<脚本>标签的方式提供向浏览器提供一个模版。利用handlebars.compile编译JavaScript模板。

    它采用预编译方式,This will result in a smaller required runtime library and significant savings from not having to compile the template in the browser. This can be especially important when working with mobile devices.

    <script id="entry-template" type="text/x-handlebars-template">
      template content
    </script>
    var source   = $("#entry-template").html();
    var template = Handlebars.compile(source);

    。。。。。

  • 相关阅读:
    修改python默认版本
    Ansible基础
    day21
    paramiko上传文件到Linux
    参考书籍
    C++解析三
    块设备
    assert用法
    块设备驱动2
    块设备驱动1
  • 原文地址:https://www.cnblogs.com/dingding0505/p/3724964.html
Copyright © 2011-2022 走看看