Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Jeff Kerr gojefferson

🎯
Focusing
View GitHub Profile
View controllers.application.js
import Ember from 'ember';
// this is a bit of a weird construction, but it prevents duplicating the default
// values in the controller and the route. It'd probably be possible to make a helper
// here to make it a bit less weird. Or if default values are always null, this isn't necessary
const ApplicationController = Ember.Controller.extend({
queryParams: ['statusId', 'caseId']
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember This is',
thisDate: new Date(),
actions: {
setDate (value) {
alert(value);
}
View components.animate-transition.js
import Ember from 'ember';
export default Ember.Component.extend({
didRender() {
Ember.run.next(() => this.get('element').classList.add('animate'))
}
});
View components.animate-transition.js
import Ember from 'ember';
export default Ember.Component.extend({
didRender() {
Ember.run.next(() => this.get('element').classList.add('animate'))
}
});
View components.wheel-component.js
import Ember from 'ember';
export default Ember.Component.extend({
didInsertElement() {
console.log(this.$().text());
this.$().on('wheel', () => {
console.log(`what is thi waht`);
});
}
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
items: [],
actions: {
createItems () {
for (let i = 0; i < 500; i++) {
View components.route-component.js
import Ember from 'ember';
const { computed } = Ember.Object;
import { task, timeout } from 'ember-concurrency';
// import watchedAttrs from '../mixins/watch-attrs';
export default Ember.Component.extend(watchedAttrs, {
watchedAttrs: computed(() => [
'page',
'limit',
'filter'
View components.page-layout.js
import Ember from 'ember';
export default Ember.Component.extend({
});
@gojefferson
gojefferson / controllers.application.js
Last active Feb 22, 2019
Basic Dropdown Positioning
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
You can’t perform that action at this time.