2012-12-03 23 views
5

के साथ प्रीकंपलिंग हैंडलबार टेम्पलेट्स मुझे अपनी निर्माण प्रक्रिया के हिस्से के रूप में अपने एम्बर टेम्पलेट्स को प्रीकंपाइल करना अच्छा लगेगा - जब मैं एम्बर-प्रीकंपाइल टूल का उपयोग करने का प्रयास करता हूं, परिणामी फ़ंक्शन में टेम्पलेट डेटा होता है और उसे रेंडरबफर में जोड़ता है ऑब्जेक्ट, लेकिन एक खाली स्ट्रिंग देता है जिसके परिणामस्वरूप कुछ भी प्रदर्शित नहीं होता है।ember.js

Ember.TEMPLATES["ins"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) { 
helpers = helpers || Ember.Handlebars.helpers; 
    var buffer = '', stack1, stack2, stack3, foundHelper, tmp1, self=this, escapeExpression=this.escapeExpression; 



    data.buffer.push(" <script type=\"text/x-handlebars\" data-template-name=\"FramesInstructions\">\n  Instructions - Click on the frames in the correct order!<br>\n  <a "); 
    stack1 = depth0; 
    stack2 = "watchCommercial"; 
    stack3 = helpers.action; 
    tmp1 = {}; 
    debugger 
    tmp1.hash = {}; 
    tmp1.contexts = []; 
    tmp1.contexts.push(stack1); 
    tmp1.data = data; 
    stack1 = stack3.call(depth0, stack2, tmp1); 
    data.buffer.push(escapeExpression(stack1) + "> START </a>\n </script>\n"); 
    return buffer; 
}); 

उत्तर

2

मैंने टेम्पलेट के चारों ओर स्क्रिप्ट टैग छोड़े। DUR