Skip to content

Instantly share code, notes, and snippets.

@catc
Last active October 19, 2016 15:40
Show Gist options
  • Save catc/804e5828f545ade9052b112001b423d3 to your computer and use it in GitHub Desktop.
Save catc/804e5828f545ade9052b112001b423d3 to your computer and use it in GitHub Desktop.
hashes and yields
import Ember from 'ember';
export default Ember.Component.extend({
_init: Ember.on('init', function(){
//console.log()
})
});
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
{{#num-one
v="vvvvvvv"
as |n a b|}}
{{n.numThree}}
<br>========<br>
{{#n.body
x2="this is x2"
}}
this is the body!
{{/n.body}}
{{/num-one}}
{{yield (hash
body=(component "num-two"
la="lalalalal"
x=v
)
numThree=(component "num-three")
)}}
some basic content from num-one
--
<br>
{{yield}} - {{la}} - {{x}} - {{x2}}
<br>
--
{
"version": "0.10.5",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.8.0",
"ember-data": "2.8.0",
"ember-template-compiler": "2.8.0",
"ember-testing": "2.8.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment