Skip to content

Instantly share code, notes, and snippets.

@ro0gr
Created June 13, 2018 14:33
Show Gist options
  • Save ro0gr/8f4d651a0588716d8019554619819672 to your computer and use it in GitHub Desktop.
Save ro0gr/8f4d651a0588716d8019554619819672 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import EmberRouter from '@ember/routing/router';
import config from './config/environment';
const Router = EmberRouter.extend({
location: 'none',
rootURL: config.rootURL
});
Router.map(function() {
});
export default Router;
import Ember from 'ember';
export default Ember.Route.extend({
actions: {
onEnter(e) {
alert('{{input}} enter handled')
}
}
});
<h1>Welcome to {{appName}}</h1>
{{input enter=(action send "onEnter")}}
<br>
<br>
{{outlet}}
<br>
<br>
{
"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