Skip to content

Instantly share code, notes, and snippets.

@aliencode
aliencode / handlebar.md
Created June 28, 2013 02:24
handlebar 方法参考文档

handlebar 方法参考文档

介绍

Handlebars是JavaScript一个语义模板库,通过对view和data的分离来快速构建Web模板。它采用"Logic-less template"(无逻辑模版)的思路,在加载时被预编译,而不是到了客户端执行到代码时再去编译, 这样可以保证模板加载和运行的速度。Handlebars兼容Mustache,你可以在Handlebars中导入Mustache模板。

使用与安装

Handlebars的安装非常简单,你只需要从Github下载最新版本,你也可访问下面网址获取最新信息:http://handlebarsjs.com。 目前handlebars.js已经被许多项目广泛使用了,handlebars是一个纯JS库,因此你可以像使用其他JS脚本一样用script标签来包含handlebars.js

@aliencode
aliencode / Get-Context-Param.md
Last active December 18, 2015 11:58
获取web.xml里的context-param配置

##web.xml:

    <context-param>
        <param-name>email</param-name>
        <param-value>e@eee.com</param-value>
    <context-param>
@aliencode
aliencode / Spring3-use-properties.xml
Last active December 18, 2015 10:48
Spring3 引入 properties 文件
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations" value="classpath:zookeeper.properties"/>
</bean>