Skip to Content
한 권으로 끝내는 Node & Express: 웹사이트 구축을 위한 서버 사이드 자바스크립트
book

한 권으로 끝내는 Node & Express: 웹사이트 구축을 위한 서버 사이드 자바스크립트

by 한성용, 이선 브라운
April 2016
Beginner to intermediate
389 pages
9h 8m
Korean
Hanbit Media, Inc.
Content preview from 한 권으로 끝내는 Node & Express: 웹사이트 구축을 위한 서버 사이드 자바스크립트
121
7
-
핸들바를 사용한 템플릿
<
head
>
요소에 내용을 추가하고, 제이쿼리를 사용하는 스크립트를 추가해봅시다.
{{#
section
'
head
'}}
<!
--
we want Google to ignore this page
--
>
<
meta name
=
"
robots
"
content
=
"
noindex
">
{{/
section
}}
<
h1
>
Test Page
</
h1
>
<
p
>
We
'
re testing some jQuery stuff
.</
p
>
{{#
section
'
jquery
'}}
<
script
>
$('
document
').
ready
(
function
(){
$('
h1
').
html
('
jQuery Works
');
});
</
script
>
{{/
section
}}
이제 레이아웃(
main
.
handlebars
)에
{{{
body
}}}
를 넣었던 것과 마찬가지로 섹션을 넣을 수
있습니다.
<!
doctype html
>
<
html
>
<
head
>
<
title
>
Meadowlark Travel
</
title
>
{{{
_
sections
.
head
}}}
</
head
>
<
body
>
{{{
body
}}}
<
script src
=
"
http
://
code
.
jquery
.
com
/
jquery
-
2
.
0
.
2
.
min
.
js
"></
script
>
{{{
_
sections
.
jquery
}}}
</
body
>
</
html
>
7.4.8.
템플릿 완벽하게 만들
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

한 권으로 끝내는 Node & Express(2판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것

한 권으로 끝내는 Node & Express(2판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것

한선용, 이선 브라운

Publisher Resources

ISBN: 9788968482229