Skip to content

Instantly share code, notes, and snippets.

@eddie-ruva
Created June 6, 2018 20:44
Show Gist options
  • Save eddie-ruva/dbeaafca796f4a6c8fb00392e47d5e42 to your computer and use it in GitHub Desktop.
Save eddie-ruva/dbeaafca796f4a6c8fb00392e47d5e42 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
tooltipsContent: {
pageViewCount: 'Hello!',
uniqueVisitorCount: 'Bye'
},
items: ['pageViewCount', 'uniqueVisitorCount', 'more']
});
{{#each items as |item|}}
{{#if (get tooltipsContent item)}}
Show tooltip:
{{get tooltipsContent item}}
{{else}}
No content :(
{{/if}}
<br/>
{{/each}}
{
"version": "0.14.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": "2.18.2",
"ember-template-compiler": "2.18.2",
"ember-testing": "2.18.2"
},
"addons": {
"ember-data": "2.18.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment