Skip to content

Instantly share code, notes, and snippets.

@adamjmcgrath
Created December 14, 2016 15:29
Show Gist options
  • Save adamjmcgrath/1b3c5f63a7bbafd0df1059f4faaae022 to your computer and use it in GitHub Desktop.
Save adamjmcgrath/1b3c5f63a7bbafd0df1059f4faaae022 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
var id = 0;
export function initialize(application) {
application.register('foo:bar', Ember.Object.extend({
id: Ember.computed(function() {
return ++id;
})
}), { singleton: false });
application.inject('component', 'foo', 'foo:bar');
}
export default {
name: 'app-init',
initialize
};
<h1>Welcome to {{appName}}</h1>
{{ my-component }}
{{ my-component }}
{{ my-component }}
{
"version": "0.10.6",
"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-template-compiler": "release",
"ember-testing": "release"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment