Mustache/Hogan.js에서 partials/template 상속을 정말로 이해하지 못합니다. here과 here으로 정의 했으므로이 작업을 수행하려면 두 개의 다른 파일이 있어야합니다. 돕는턱수염에서 부분/템플릿 상속은 어떻게 작동합니까?
<template id="server-template"> {{#servers}} <b>some html and {{> some other which I dont understand how to use}}</b> {{/servers}} </template> <template id="room-template"> I want this in up there. (in the "partials" tag) </template>
감사 : 내 (클라이언트 측) 페이지에서 다음과 같이 나는 그것을 사용합니다. 나는이 그들을 컴파일 :
var source = $('#room-template').html(), compiled = Hogan.compile(source) $('#main').html(compiled.render(data))
는 그게 가능합니까? 당신이 별도로 파셜를 컴파일하고 render
기능에 전달해야
대단히 감사합니다. :) – kurtextrem