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({ | |
| greeting: 'Hello', | |
| actions: { | |
| showAlert(message) { | |
| const greeting = this.get('greeting'); | |
| alert(`${greeting}, ${message}!`); |
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({ | |
| queryParams: ['endDate'], | |
| startDate: '09/01/2017', | |
| endDate: '09/30/2017' | |
| }); |
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({ | |
| store: Ember.inject.service(), | |
| count: 0, | |
| foo: null, | |
| init() { | |
| this._super(...arguments); |
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 { run } from '@ember/runloop'; | |
| import { computed } from '@ember/object'; | |
| const { stringify } = JSON; | |
| export default function(...props) { | |
| const { getState, update } = props.pop(); | |
| const strippedProps = props.map((prop) => { |
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 Model from 'ember-data/model'; | |
| import { validator } from 'ember-cp-validations'; | |
| import attr from 'ember-data/attr'; | |
| import buildValidations from '../utils/build-validations'; | |
| const ValidationsMixin = buildValidations({ | |
| street: { | |
| deferred: true, // N.B. | |
| validators: [ |
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
| module.exports = { | |
| // .. | |
| rules: { | |
| 'arrow-parens': [2, 'as-needed', { requireForBlockBody: true }], | |
| // .. | |
| } | |
| // .. | |
| } |
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'; | |
| import computed from 'ember-macro-helpers/computed'; | |
| const Foo = Ember.ArrayProxy.extend({ | |
| content: [], | |
| expected: computed('[email protected]', content => JSON.stringify({ content })), | |
| actual: computed('@each.qux', content => JSON.stringify({ content })) | |
| }); |
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' | |
| }); |