"Handlebars"의 두 판 사이의 차이
둘러보기로 가기
검색하러 가기
잔글 (사용자가 "Handlebars" 문서를 보호했습니다 ([편집=관리자만 허용] (무기한) [옮기기=관리자만 허용] (무기한))) |
잔글 |
||
(같은 사용자의 중간 판 10개는 보이지 않습니다) | |||
3번째 줄: | 3번째 줄: | ||
− | + | *Site : http://handlebarsjs.com/ | |
+ | *Manual | ||
+ | **[https://zordius.github.io/HandlebarsCookbook/ https://zordius.github.io/HandlebarsCookbook/] | ||
+ | *License | ||
+ | |||
+ | == 사용법 == | ||
+ | |||
+ | JavaScript 로그 조회 | ||
+ | <pre>{{log ../domains.[0]}}</pre> | ||
+ | |||
+ | <pre><script id="domain_list_content" type="text/x-handlebars-template"> | ||
+ | {{#if debug}}<th>Links</th>{{else}} ~ {{/if}} | ||
+ | {{#if @index % 2 == 0}} | ||
+ | |||
+ | {{#each domains}} | ||
+ | Map : {{@key}}, {{this}} | ||
+ | List : {{@index}}, {{this}} | ||
+ | @first, @last {{#unless @last}}~{{/unless}} | ||
+ | {{/each}} | ||
+ | |||
+ | {{#each array as |value key|}} | ||
+ | {{#each child as |childValue childKey|}} | ||
+ | {{key}} - {{childKey}}. {{childValue}} | ||
+ | {{/each}} | ||
+ | {{/each}} | ||
+ | |||
+ | articles.[10].[#comments]는 articles[10]['#comments']를 표시 한다. | ||
+ | |||
+ | <font face="sans-serif, Arial, Verdana, Trebuchet MS"><span style="white-space: normal;"> | ||
+ | </span></font></pre> | ||
== 참고 문헌 == | == 참고 문헌 == | ||
− | *http://programmingsummaries.tistory.com/381 | + | *[http://programmingsummaries.tistory.com/381 http://programmingsummaries.tistory.com/381] |
2016년 11월 11일 (금) 18:36 기준 최신판
handlebars JavaScript Library를 정리 한다.
- Site : http://handlebarsjs.com/
- Manual
- License
사용법
JavaScript 로그 조회
{{log ../domains.[0]}}
<script id="domain_list_content" type="text/x-handlebars-template"> {{#if debug}}<th>Links</th>{{else}} ~ {{/if}} {{#if @index % 2 == 0}} {{#each domains}} Map : {{@key}}, {{this}} List : {{@index}}, {{this}} @first, @last {{#unless @last}}~{{/unless}} {{/each}} {{#each array as |value key|}} {{#each child as |childValue childKey|}} {{key}} - {{childKey}}. {{childValue}} {{/each}} {{/each}} articles.[10].[#comments]는 articles[10]['#comments']를 표시 한다. <font face="sans-serif, Arial, Verdana, Trebuchet MS"><span style="white-space: normal;"> </span></font>