Skip to content

Instantly share code, notes, and snippets.

@chadhietala chadhietala/hello-world.hbs Secret
Last active Oct 5, 2017

Embed
What would you like to do?
<h1>Hello {{name}}!</h1>
// Compiled hello-world.hbs in old engine
(function() {
return {
meta: {
"revision": "Ember@1.13.5",
"loc": {
"source": null,
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
}
},
arity: 0,
cachedFragment: null,
hasRendered: false,
buildFragment: function buildFragment(dom) {
var el0 = dom.createDocumentFragment();
var el1 = dom.createElement("h1");
var el2 = dom.createTextNode("Hello ");
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,10],[1,18]]]]
],
locals: [],
templates: []
};
}())
// Compiled hello-world.hbs in new engine
{
"statements": [
[
11,
"h1",
[]
],
[
13
],
[
0,
"Hello "
],
[
1,
[
26,
[
"name"
]
],
false
],
[
14
]
],
"locals": [],
"named": [],
"yields": [],
"hasPartials": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.