๋ณ์๋ฅผ {}๋ก ๋ฌถ๊ณ ์ถ์ ์ฝง์์ผ ํ ํ๋ฆฟ์ด ์์ต๋๋ค.
var output = Mustache.render('<td>{{{start.lat}}, {{start.lon}}}</td>', routeObj);
<td>
๋ฌธ์์ด๊ณผ ํจ๊ป {1.8978, 30.4545}
๋ฅผ ์ถ๋ ฅํ๊ณ ์ถ์ต๋๋ค.
{{{๋ ์ฝง์์ผ์ ํน๋ณํ ์๋ฏธ๊ฐ ์์ผ๋ฏ๋ก ์๋ํ์ง ์์ต๋๋ค. ์ฝง์์ผ์ ์ฒซ ๋ฒ์งธ {๋ฅผ ํ์ถํ๋ ๋ฐฉ๋ฒ์ด ์์ต๋๊น?
๋ด๊ฐ ์๊ฐํ ์ ์๋ ๋ ๊ฐ์ง ๋ฐฉ๋ฒ:
var output = Mustache.render('<td>{{=<% %>=}}{<% start.lat %>, <% start.lon %>}<%={{ }}=%></td>', routeObj);
routeObj.openbrace = '{';
routeObj.closebrace = '}';
var output = Mustache.render('<td>{{openbrace}}{{start.lat}}, {{start.lon}}{{closebrace}}</td>', routeObj);
@alanhamlett ์ ๋ํ html ๊ฐ์ฒด์ ๋ํด ๋ค์๊ณผ {
๋ {
์ด๊ฒ์ ๋ชจ๋ ์๋ํฉ๋๋ค. ๊ฐ์ฌ ํด์!
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๋ด๊ฐ ์๊ฐํ ์ ์๋ ๋ ๊ฐ์ง ๋ฐฉ๋ฒ:
var output = Mustache.render('<td>{{=<% %>=}}{<% start.lat %>, <% start.lon %>}<%={{ }}=%></td>', routeObj);
routeObj.openbrace = '{'; routeObj.closebrace = '}'; var output = Mustache.render('<td>{{openbrace}}{{start.lat}}, {{start.lon}}{{closebrace}}</td>', routeObj);