This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Builder<T> { | |
private data: Partial<T> = {}; | |
constructor(initialData?: Partial<T>) { | |
if (initialData) { | |
this.data = { ...initialData }; | |
} | |
} | |
with<K extends keyof T>(key: K, value: T[K]): Builder<T> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,01,00,3a,00, 00,00,00,00 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import Changeset from 'ember-changeset'; | |
import lookupValidator from 'ember-changeset-validations'; | |
import { | |
validateFormat | |
} from 'ember-changeset-validations/validators'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
isValid: undefined, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import { changeset } from 'ember-changeset'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
init() { | |
this._super(...arguments); | |
let ChangesetClass = changeset({}); | |
let MyClass = ChangesetClass.extend({ sayHello: name => `hello ${name}` }); | |
let myClassInstance = MyClass.create({}); // also work with new MyClass({}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import Changeset from 'ember-changeset'; | |
import lookupValidator from 'ember-changeset-validations'; | |
import ValidationFactory from 'twiddle/validations/application-factory'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
store: Ember.inject.service('store'), | |
init() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
actions: { | |
click1() { | |
document.getElementById('test1').value = 'test 1 value'; | |
console.log('test 1:', this.get('test1Val')); | |
}, | |
click2() { | |
Ember.$('#test2').val('test 2 value'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
actions: { | |
goTo() { | |
this.transitionToRoute('food'); | |
} | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import ParentComponent from 'twiddle/components/parent-component'; | |
const Child = ParentComponent.extend(Ember.Evented, { | |
onOpen: function() { alert('success'); }.on('open'), | |
actions: { | |
open() { | |
this.toggleProperty('open'); | |
} | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DISCUSSION: | |
Properties That would need to be added to call flow: | |
- isEnd | |
- branches | |
-- I am demoing branches as a boolean value but I am considering making it an array to show possibilities | |
- nextFlowId | |
-- We can possibly make this an array and not use the branches property | |
- max and min (for input validation) | |
-- Should work with number and dates |
NewerOlder