Когда я вызываю вложенный шаблон {{template "partials/mirror.html" .}}
, он выдает эту ошибку:
results.go:232: Template Execution Error (in App/index.html): html/template:App/index.html: "\"" in attribute name: " class\"quote-component\" id=\"quot"
Если я создам контроллер специально для шаблона, который вызывает App/index.html
, например:
package controllers
import "github.com/revel/revel"
type Mirror struct {
*revel.Controller
}
func (m Mirror) Index() revel.Result {
return m.Render()
}
Я все еще получаю:
results.go:232: Template Execution Error (in Mirror/index.html): html/template:Mirror/index.html: "\"" in attribute name: " class\"quote-component\" id=\"quot"
Вот содержимое mirror.html
:
<!-- AUTH STATES -->
<section class="auth-states">
<!-- FACE DETECTED W/IN RANGE -->
{{template "partials/faceClose.html" .}}
<!-- USER DETECTED -->
{{template "partials/userDetected.html" .}}
<!-- NON USER DETECTED -->
{{template "partials/nonUserDetected.html" .}}
<!-- TIME OUT LOGS USER OUT -->
{{template "partials/loggingOut.html" .}}
</section>
<div class="clear eyelevel">
<!-- WEATHER-->
{{template "partials/weather.html" .}}
<!-- TIMELY CONTENT: TIMESTAMP AND ALERTS -->
<div class="timely-content">
<!-- TIMESTAMP -->
{{template "partials/timestamp.html" .}}
<!-- EMOTION -->
{{template "partials/emotion.html" .}}
</div>
</div>
<img id="shot-preview"/>
<!-- LOW PRIORITY CONTENT -->
<section class="low-pri-content auth-content">
<h2 class="logged-in-stamp">
Here's the scoop, <span id="logged-in-name"></span>:
</h2>
{{template "partials/traffic.html" .}}
{{template "partials/stocks.html" .}}
{{template "partials/newsFeed.html" .}}
</section>
<div id="video-hidden" aria-hidden="true">
<video id="cameraPreview" class="cameraPreview"></video>
</div>
<script src="https://code.jquery.com/jquery-2.2.1.js"></script>
<script src="https://cdn.jsdelivr.net/momentjs/2.11.2/moment.min.js"></script>
<script src="/public/js/weather.js"></script>
<script src="/public/js/stock.js"></script>
<script src="/public/js/news.js"></script>
<script src="/public/js/traffic.js"></script>
<script src="/public/js/mirror.js"></script>
<script src="/public/js/authenticate.js"></script>
Структура приложения соответствует рекомендациям Revel, сам проект просто переносит этот проект из Node to Go с использованием Revel.
Мой вопрос: что означает это сообщение об ошибке? Он всегда загружает верхние 4 строки файла mirror.html
, независимо от того, какие верхние 4 строки.