Skip to content

Instantly share code, notes, and snippets.

@nathanhammond
Created September 13, 2016 06:08
Show Gist options
  • Save nathanhammond/4373f6e038d083cbbd88cbb5c91b9794 to your computer and use it in GitHub Desktop.
Save nathanhammond/4373f6e038d083cbbd88cbb5c91b9794 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';
import config from './config/environment';
const Router = Ember.Router.extend({
location: 'none',
rootURL: config.rootURL
});
Router.map(function() {
this.route('child');
});
export default Router;
import Ember from 'ember';
export default Ember.Route.extend({
actions: {
hello: function() { alert('here'); }
}
});
{{#link-to 'child'}}child{{/link-to}}
<hr />
{{outlet}}
child
{{my-component}}
<h3>My Component</h3>
<button {{action 'hello'}}>hello</button>
{
"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