Skip to content

Instantly share code, notes, and snippets.

View aaronfischer's full-sized avatar

Aaron Fischer aaronfischer

View GitHub Profile
@aaronfischer
aaronfischer / controllers.application.js
Created April 18, 2018 02:02 — forked from sukima/controllers.application.js
test iterate object and change value
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
thing: {
'first-name': 'Aaron',
'hello_last-name': '',
'status': '',
},
@aaronfischer
aaronfischer / controllers.foo.js
Last active January 18, 2018 05:57 — forked from sukima/controllers.foo.js
Infinate route refresh two task approach - from @sukima
import Ember from 'ember';
export default Ember.Controller.extend({
people: Ember.computed.or('model.{current,previous}.value'),
isLoading: Ember.computed.reads('model.current.isRunning'),
fetchError: Ember.computed.reads('model.current.error'),
actions: {
fetchMore() {
this.send('refreshModel');
import Ember from 'ember';
export default Ember.Controller.extend({
});
@aaronfischer
aaronfischer / controllers.application.js
Last active January 25, 2017 18:09 — forked from samselikoff/controllers.application.js
Mirage 0.3 - One to Many
import Ember from 'ember';
export default Ember.Controller.extend({
db: Ember.computed('refreshDb', function() {
let dump = window.server.schema.db.dump();
return JSON.stringify(dump, null, 2);
}),
@aaronfischer
aaronfischer / adapters.application.js
Last active January 19, 2018 17:39 — forked from samselikoff/mirage.config.js
mirage reflexive - include error
import DS from 'ember-data';
import UrlTemplates from 'ember-data-url-templates';
export default DS.JSONAPIAdapter.extend(UrlTemplates, {
host: '',
namespace: 'api',
urlTemplate: '{+host}/{+namespace}/{pathForType}{/id}',
});
import Adapter from "ember-data/adapters/json-api";
export default Adapter.extend();
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});