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'; | |
| export default Ember.Controller.extend({ | |
| featureFlags: Ember.inject.service(), | |
| actions: { | |
| toggleFeatureFlag(flagName) { | |
| this.get('featureFlags').toggleFeatureFlag(flagName); | |
| } | |
| } |
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 LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
| function _generateBaz() { | |
| const index = Math.floor(Math.random() * LETTERS.length); | |
| return LETTERS[index]; | |
| } | |
| const { get, set } = Ember; |
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'; | |
| export default Ember.Controller.extend({ | |
| actions: { | |
| clickContent() { | |
| alert('You clicked me!'); | |
| } | |
| } | |
| }); |
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({ | |
| foo: null, | |
| fooLabel: 'null', | |
| fooIsEmpty: computed.empty('foo'), | |
| bar: '', |
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'; | |
| export default Ember.Controller.extend({ | |
| appName: 'Ember 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'; | |
| export default Ember.Controller.extend({ | |
| appName: 'Ember 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 const FACE_COLOR_OPTIONS = [ | |
| { value: 'salmon', label: 'red' }, | |
| { value: 'orange', label: 'orange' }, | |
| { value: 'yellow', label: 'yellow' }, | |
| { value: 'palegreen', label: 'green' }, | |
| { value: 'lightblue', label: 'blue' }, |
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'; | |
| export default Ember.Component.extend({ | |
| foo: 'component-foo', | |
| logFoo() { | |
| alert(this.get('foo')); | |
| }, | |
| actions: { |
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, get, set } = Ember; | |
| const CHESS = { id: 'chess', name: 'Chess' }; | |
| const SPORTS = { id: 'sports', name: 'Sports' }; | |
| const MUSIC = { id: 'music', name: 'Music' }; | |
| const ART = { id: 'art', name: 'Art' }; | |
| function buildStudents() { |
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'; | |
| export default Ember.Component.extend({ | |
| }); |