meteor create --bare ex1 && cd ex1
meteor remove static-html
meteor add blaza-html-template
mkdir client server lib
vi client/index.html
<body>
{{> main}}
</body>
<template name="main">
<h1>Hello Folks</h1>
</template>
meteor create --bare ex2 && cd ex2
mkdir client && cd client
mkdir lib && cd lib
vi index.html
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Index</title>
</head>
<body>
<h1>Index</h1>
</body>
cd ..
vi about
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
</head>
<body>
<h1>about</h1>
</body>
- client/lib/index.html > client/about.html 순으로 로딩. head 도 마찬가지 순서로 적재한다.
- Meteor 객체 살아있고 연결도 되있음. collection만들고 publish/subscribe하면 마찬가지로 적용됨
- js에
import './main.html'
과 같은 진입점이 필요.
- 기본예제처럼
import { Template } from 'meteor/templating';
를 포함하지 않아도 작동.