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 Component from '@glimmer/component'; | |
import { computed } from '@ember/object'; | |
import { inject as service } from '@ember/service'; | |
export default class MyComponent extends Component { | |
@service('router') router; | |
@computed('args.foo', 'router.currentRouteName') | |
get routeMatch() { | |
return this.args.foo === this.router.currentRouteName; |
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 Component from '@glimmer/component'; | |
export default class extends Component { | |
} |
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 Component from '@ember/component'; | |
export default Component.extend({}); |
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
// ember-sinon-qunit (New) | |
// test-helper.js | |
import { setApplication } from '@ember/test-helpers'; | |
import { start } from 'ember-qunit'; | |
import Application from '../app'; | |
import config from '../config/environment'; | |
import setupSinon from 'ember-sinon-qunit'; | |
setApplication(Application.create(config.APP)); |
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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
foo: 'foo', | |
bar: 'bar' | |
}); |
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 Ember from 'ember'; | |
import layout from 'app/templates/components/list-controls'; | |
export default Ember.Component.extend({ | |
layout, | |
move: null, | |
actions: { | |
itemMoved() { |
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
// Based on https://github.com/jigish/dotfiles/blob/master/slate.js | |
// Configs | |
S.cfga({ | |
"defaultToCurrentScreen" : true, | |
"secondsBetweenRepeat" : 0.1, | |
"checkDefaultsOnLoad" : true, | |
"focusCheckWidthMax" : 3000, | |
"orderScreensLeftToRight" : true | |
}); |
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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
init() { | |
this._super(); | |
this.set('bar', {}); | |
this.set('keys', Object.keys(Ember.get(this, 'bar'))); | |
}, | |
actions: { |
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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
init() { | |
this._super(); | |
this.set('bar', { foo: 'stuff' }); | |
}, | |
actions: { | |
foo() { |