Last active
March 14, 2020 05:14
-
-
Save GavinJoyce/e6e0cc4fedbcf96d39267e59ba85472c to your computer and use it in GitHub Desktop.
Ember Templates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//<p class="name">hi {{name}}</p> | |
Handlebars.templates["hi"]=function(data) { | |
return "<p class=\"name\">hi " | |
+ escapeExpression(data['name']) | |
+ "</p>\n"; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//<p class="name">hi {{name}}</p> | |
(function() { | |
return { | |
meta: {}, | |
isEmpty: false, | |
arity: 0, | |
cachedFragment: null, | |
hasRendered: false, | |
buildFragment: function buildFragment(dom) { | |
var el0 = dom.createDocumentFragment(); | |
var el1 = dom.createElement("p"); | |
dom.setAttribute(el1,"class","name"); | |
var el2 = dom.createTextNode("hi "); | |
dom.appendChild(el1, el2); | |
var el2 = dom.createComment(""); | |
dom.appendChild(el1, el2); | |
dom.appendChild(el0, el1); | |
return el0; | |
}, | |
buildRenderNodes: function buildRenderNodes(dom, fragment, contextualElement) { | |
var morphs = new Array(1); | |
morphs[0] = dom.createMorphAt(dom.childAt(fragment, [0]),1,1); | |
return morphs; | |
}, | |
statements: [ | |
["content","name",["loc",[null,[1,19],[1,27]]],0,0,0,0] | |
], | |
locals: [], | |
templates: [] | |
}; | |
}()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//<p class="name">hi {{name}}</p> | |
["open-element","p",[]] | |
["static-attr","class","name"] | |
["flush-element"] | |
["text","hi "] | |
["append",["unknown",["name"]],false] | |
["close-element"] |
Author
GavinJoyce
commented
Sep 15, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment