Forked from chancancode/controllers.application.js
Created
December 24, 2017 17:43
-
-
Save machty/61197677a9f8cda9d3da4e46ae558a63 to your computer and use it in GitHub Desktop.
New Twiddle
This file contains hidden or 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 Ember from 'ember'; | |
const { computed } = Ember; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
firstName: 'Godfrey', | |
lastName: 'Chan', | |
fullName: computed('firstName', 'lastName', function() { | |
let { firstName, lastName } = this; | |
return `${firstName} ${lastName}`; | |
}), | |
preferFirstName: true, | |
preferredName: computed('firstName', function() { | |
return this.firstName; | |
}), | |
displayName: computed('preferFirstName', 'preferredName', 'firstName', function() { | |
return this.preferFirstName ? this.firstName : this.preferredName; | |
}) | |
}); |
This file contains hidden or 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.12.1", | |
"EmberENV": { | |
"FEATURES": { | |
"ember-metal-es5-getters": true | |
} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "canary", | |
"ember-template-compiler": "canary", | |
"ember-testing": "canary" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment