LENKER parse error on #jede

Ich fahre das folgende JSON-Objekt

{"status":"success",
"valmessage":"Your message has been sent successfully.",
"postcontent":{
    "post_author":1,
    "post_recipient":"1",
    "post_title":"handle test 2",
    "post_type":"wp_inbox_msg",
    "post_content":"<p>giving it another go.<\/p>\n"},
"postmeta":{
    "postid":410,
    "postdate":"Monday, March 17th, 2014",
    "author":"admin"},"replies":null,
    "Formerrors":[]
}

und ich bin immer folgende Fehler in meinem LENKER Vorlage :

Uncaught Error: Parse error on line 23:
...replies}}                    {{ #each replies }
----------------------^
Expecting 'ID', 'DATA', got 'INVALID' 

in meinem tempalte ich mache Folgendes :

        {{#if replies}}
                {{ #each replies }}
                    <li>
                        <figure class="reply-author-img">
                            <img alt="" src="{{ avatar }}" height="96" width="96">
                        </figure>
                        <div class="replycontentwrap">
                            <div class="reply-from">
                                <p class="reply-author">
                                    <strong>{{ fullname }}</strong>
                                    <span>{{ nickname }}</span>
                                </p>
                                <span class="replydate">{{ reply_date }}</span>
                            </div>
                            <div class="reply-content">{{ reply_content }}</div>
                        </div>
                    </li>
                {{ /each }}
            {{/if}}

Antworten ist derzeit Null, aber es sollte wieder eine Gruppe von Objekten, wenn es auf die Nachricht antwortet, Wie wäre der beste Weg, um 1) dies funktioniert und 2) Ansatz dieser Art von Daten mit Struktur handlebars.js ?

InformationsquelleAutor bigmadwolf | 2014-03-17
Schreibe einen Kommentar