Skip to content

Instantly share code, notes, and snippets.

@robomalo
Created September 25, 2019 22:26
Show Gist options
  • Save robomalo/a2c750d05b3b9a982bd631bb9eca04d2 to your computer and use it in GitHub Desktop.
Save robomalo/a2c750d05b3b9a982bd631bb9eca04d2 to your computer and use it in GitHub Desktop.
Entity sample
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Controller.extend({
});
<h2>Has image</h2>
{{#entity-figure}}
<img src="https://placekitten.com/100/100" alt="kitty">
{{/entity-figure}}
<h2>No image</h2>
{{entity-figure}}
{{#if hasBlock}}
{{yield}}
{{else}}
<img src="http://www.myiconfinder.com/uploads/iconsets/256-256-8f47e792bc78fa4b0a2afd1b439129c9-ghost.png" alt="ghost" height=50 width=50>
{{/if}}
{
"version": "0.15.1",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js",
"ember": "3.4.3",
"ember-template-compiler": "3.4.3",
"ember-testing": "3.4.3"
},
"addons": {
"ember-data": "3.4.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment