Skip to content

Instantly share code, notes, and snippets.

View mydea's full-sized avatar

Francesco Novy mydea

View GitHub Profile
@mydea
mydea / adapters.application.js
Last active June 2, 2016 15:28
Ember Bug Showcase
import DS from 'ember-data';
export default DS.RESTAdapter.extend();
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
queryParams: ['myParam'],
myParam: null
});
@mydea
mydea / controllers.application.js
Last active April 18, 2017 09:51
power-select-initially-open
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
options: [],
showSelect: false,
actions: {
onchange() {},
@mydea
mydea / controllers.application.js
Created August 14, 2018 06:42
Test ED model.hasOwnProperty('id')
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
check: Ember.computed(function() {
let item = this.store.createRecord('item', { name: 'John'});
return {
hasId: item.hasOwnProperty('id'),
hasName: item.hasOwnProperty('name')
@mydea
mydea / controllers.application.js
Created August 20, 2018 06:56
Dotted property lookup
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
output: Ember.computed(function() {
let obj = {
'test.dotted': 'string object',
test: {
dotted: 'nested object'
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@mydea
mydea / components.test-component.js
Last active February 20, 2019 15:11
Angle bracket vs. Curly brace values
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'span',
value: 'default value'
});
import JSONAPIAdapter from 'ember-data/adapters/json-api';
import AdapterFetch from 'ember-fetch/mixins/adapter-fetch';
export default JSONAPIAdapter.extend(AdapterFetch, {
ajax() {
let promise = this._super(...arguments);
promise.finally(() => console.log('done'));
@mydea
mydea / controllers.application.js
Created April 12, 2019 08:19
overwrite-volatile-cp
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
raven: Ember.inject.service()
});