Instantly share code, notes, and snippets.

View controllers.application.js
import Ember from 'ember';
import { alias, gt, sort } from '@ember/object/computed';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
letters: [
{ name: 'b' },
{ name: 'c' },
View components.dropdown-list-item.js
import Component from '@ember/component';
import { computed } from '@ember/object';
export default Component.extend({
mouseEnter() {
this.setActiveItems(this);
},
mouseLeave() {
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
activeClass: 'faded-in',
actions: {
toggleActiveClass() {
if (this.activeClass === 'faded-in') {
View stack-trace
runtime-polyfill.js:350 Uncaught RangeError: Maximum call stack size exceeded
at CurlyComponentManager.manager.didCreateElement (runtime-polyfill.js:350)
at CurlyComponentManager.manager.didCreateElement (runtime-polyfill.js:351)
at CurlyComponentManager.manager.didCreateElement (runtime-polyfill.js:351)
at CurlyComponentManager.manager.didCreateElement (runtime-polyfill.js:351)
at CurlyComponentManager.manager.didCreateElement (runtime-polyfill.js:351)
at CurlyComponentManager.manager.didCreateElement (runtime-polyfill.js:351)
at CurlyComponentManager.manager.didCreateElement (runtime-polyfill.js:351)
at CurlyComponentManager.manager.didCreateElement (runtime-polyfill.js:351)
at CurlyComponentManager.manager.didCreateElement (runtime-polyfill.js:351)
View components.my-list.item.js
import Ember from 'ember';
import { next } from '@ember/runloop';
export default Ember.Component.extend({
init() {
this._super(...arguments);
next(() => {
this.list.items.pushObject(this);
View components.dropdown-list.js
import Ember from 'ember';
export default Ember.Component.extend({
});
View mirage.config.js
export default function() {
//window.server = this;
this.get('users');
};
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
books: Ember.computed(function() {
//debugger;
return this.get('model').hasMany('books').value();
}),
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View mirage.config.js
export default function() {
//window.server = this;
this.get('/foo', { data: "first response" });
this.namespace = '/namespace1';
this.get('/bar', { data: "second response" });
};