Skip to content

Instantly share code, notes, and snippets.

@kellyselden
Last active September 28, 2018 20:19
Show Gist options
  • Save kellyselden/f8fe3fc5cf5bbd8820f045d8c640c9bb to your computer and use it in GitHub Desktop.
Save kellyselden/f8fe3fc5cf5bbd8820f045d8c640c9bb to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
function func1() {
alert('func1');
}
function func2() {
alert('func2');
}
export default Ember.Controller.extend({
onInit1: Ember.on('init', func1),
onObserve1: Ember.observer('asdf', func1),
onObserve2: Ember.observer('asdf', func2)
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
<br>
<br>
{
"version": "0.12.1",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "3.2.2",
"ember-template-compiler": "3.2.2",
"ember-testing": "3.2.2"
},
"addons": {
"ember-data": "2.12.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment