Last active
July 11, 2018 15:49
-
-
Save NullVoxPopuli/858ee42508e898cc0cf7478a1fed7583 to your computer and use it in GitHub Desktop.
Action Test w/ ES Classes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Controller from '@ember/controller'; | |
// import { action } from '@ember-decorators/object'; | |
// decorators and class properties are not supported by twiddle | |
export default class extends Controller { | |
// appName = 'Ember Twiddle'; | |
constructor() { | |
super(...arguments); | |
this.appName = 'Ember Twiddle'; | |
this.classProperty = () => { | |
console.log('classProperty', this.appName); | |
} | |
} | |
// classProperty = () => { | |
// console.log('classProperty', this.appName); | |
// } | |
func() { | |
console.log('func', this.appName); | |
} | |
// @action | |
// decorated() { | |
// console.log('decorated', this.appName); | |
// } | |
// actions = { | |
// traditionalAction() { | |
// console.log('traditionalAction', this.appName); | |
// } | |
// } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.15.0", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js", | |
"ember": "3.2.0", | |
"ember-template-compiler": "3.2.0", | |
"ember-testing": "3.2.0", | |
"@ember-decorators/babel-transforms": "^2.0.0", | |
"ember-decorators": "^2.0.0" | |
}, | |
"addons": { | |
"ember-data": "3.1.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment