Skip to content

Instantly share code, notes, and snippets.

import Ember from 'ember';
import QueryParams from 'ember-parachute';
export const myQueryParams = new QueryParams({
'qps.housingType': {
as: 'type',
defaultValue: 'single',
},
'qps.objectType.anotherProp': {
defaultValue: 'test',
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
});
import Ember from 'ember';
export default Ember.Component.extend({
hasName: Ember.computed.notEmpty('name'),
actions: {
log(message) {
console.log(message);
}
}
});
import Ember from 'ember';
export default Ember.Component.extend({
init() {
this._super();
this.instanceState = "I was created at: " + Date.now();
}
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@kumkanillam
kumkanillam / components.lazy-options.js
Created August 24, 2017 06:48 — forked from tomoguisuru/components.lazy-options.js
Power Select Custom Options
import Ember from 'ember';
import PSOptionsComponent from 'ember-power-select/components/power-select/options';
const {
$,
assert,
get,
} = Ember;
@kumkanillam
kumkanillam / components.my-child.js
Created August 7, 2017 09:56 — forked from 3gwebtrain/components.my-child.js
Calling parent action from child
import Ember from 'ember';
export default Ember.Component.extend({
});
@kumkanillam
kumkanillam / mirage.config.js
Last active July 26, 2017 17:29
TransitionToWithMultipleDynamicSegments
import Ember from 'ember';
export default function () {
window.server = this;
this.get('/categories');
this.get('/categories/:id');
this.get('/posts');
import Ember from 'ember';
import MyModelDecorator from '../decorators/my-model';
export default Ember.Component.extend({
decoratedPerson: Ember.computed('person', {
get() {
// If you needed dependency injection you would need to
// let MyModelDecorator = Ember.getOwner(this).factoryFor('decorator:my-model');
// OR
// let MyModelDecorator = Ember.getOwner(this)._lookupFactory('decorator:my-model');