Skip to content

Instantly share code, notes, and snippets.

@simonihmig
Last active November 17, 2016 16:32
Show Gist options
  • Save simonihmig/366a04e27903d0642260b48faf086749 to your computer and use it in GitHub Desktop.
Save simonihmig/366a04e27903d0642260b48faf086749 to your computer and use it in GitHub Desktop.
hasBlock not available in partial for Ember 2.9.0-beta
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{#my-component}}
<p>Success! You are seeing the block template</p>
{{/my-component}}
{{log hasBlock}}
{{#if hasBlock}}
{{yield}}
{{else}}
<p>Error: no block template available!</p>
{{/if}}
{
"version": "0.10.4",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "release",
"ember-data": "release",
"ember-template-compiler": "release"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment