Skip to content

Instantly share code, notes, and snippets.

View manufitoussi's full-sized avatar

Emmanuel Fitoussi manufitoussi

  • WIT SA
  • Nice, France
View GitHub Profile
@manufitoussi
manufitoussi / components.my-button.js
Last active October 5, 2018 15:48
Test Bubbling action
import Ember from 'ember';
export default Ember.Component.extend({
onMonClick() {
},
actions: {
monClickAction() {
this.onMonClick();
}
@manufitoussi
manufitoussi / controllers.application.js
Last active September 20, 2018 08:32
Test Values in prototype
import Ember from 'ember';
var MyObj = Ember.Object.extend({
obj: Ember.computed({
get() {
var Obj = class Obj {
shrinkValues() {
Object.keys(this).forEach(key => {
if(this[key] === Obj.prototype[key]) {
delete this[key];
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
newProp: 'propX',
newStr: 'coco',
toRemoveProp: '',
hash: {
prop1: 'value1'
import Ember from 'ember';
var MyObj = Ember.Object.extend({
value: null,
depends: null,
value2: Ember.computed('depends', {
get() {
var depends = this.get('depends') || {};
@manufitoussi
manufitoussi / binding.js
Last active March 26, 2018 14:07
New Twiddle
import Em from 'ember'
export default Em.Object.extend({
source: null,
context: Em.computed.alias('source.source'),
path: '',
data: Em.computed('context', 'path', {
get() {
console.log('definition de l\'objet data');
var _data = this.get('_data');
@manufitoussi
manufitoussi / constants.js
Last active March 7, 2018 13:14
benchmark multiple props
export default {
CONTAINERS_COUNT: 1000,
PROPS_COUNT: 100
}
@manufitoussi
manufitoussi / controllers.application.js
Created January 5, 2018 11:09
Test enqueue promises
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@manufitoussi
manufitoussi / application.controller.js
Last active September 26, 2017 16:17
form field simple
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
field1: {
label: 'mon texte',
value: 'Coucou!',
isDirty: true
},
@manufitoussi
manufitoussi / application.controller.js
Last active September 26, 2017 14:54
form field simplifié
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
field1: {
label: 'mon texte',
value: 'Coucou!',
isDirty: true
},
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
field1: {
label: 'mon texte',
value: 'Coucou!',
isDirty: true
},