Skip to content

Instantly share code, notes, and snippets.

View DanaKirsh's full-sized avatar

Dana Kirsh DanaKirsh

  • Capsule CRM
  • Manchester, UK
View GitHub Profile
@DanaKirsh
DanaKirsh / controllers.my-route\.js
Last active September 11, 2020 11:05 — forked from amk221/controllers.my-route\.js
Controller singletones
import Controller from '@ember/controller';
import { tracked } from '@glimmer/tracking';
export default class MyRouteController extends Controller {
count = 0;
}
@DanaKirsh
DanaKirsh / components.my-component\.js
Created September 11, 2020 11:12 — forked from amk221/components.my-component\.js
Controller singletons #2
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
export default class extends Component {
@tracked count = 0;
constructor() {
super(...arguments);
this.count++;
}
@DanaKirsh
DanaKirsh / adapters.my-model\.js
Last active June 1, 2023 16:38 — forked from amk221/adapters.my-model\.js
prototype pollution
import RESTAdapter from 'ember-data/adapters/rest';
export default class extends RESTAdapter {
ajax(path, method, options) {
return {
myModels: [{
id: 1,
name: 'Model 1'
}]
};