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({ | |
| actions: { | |
| foo(val) { | |
| console.log("called " + val); | |
| } | |
| }, | |
| appName: 'Ember Twiddle', | |
| test: Ember.computed(function() { |
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
| f2 = "hallo" | |
| def f1(): | |
| print(f2) | |
| f2 = "holla" | |
| f1() |
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' | |
| }); |
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({ | |
| attributeBindings: ["draggable"], | |
| classNames: ["a-handle"], | |
| draggable: true, | |
| setupDragImg: Ember.on("didInsertElement", function() { | |
| this._dragImg = document.createElement("img"); | |
| this._dragImg.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; |
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({ | |
| actions: { | |
| show() { | |
| alert('show'); | |
| }, | |
| hide() { | |
| alert('hide'); |
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
| autoload -U add-zsh-hook | |
| load-nvmrc() { | |
| if [[ -f .nvmrc && -r .nvmrc ]]; then | |
| nvm use | |
| fi | |
| } | |
| add-zsh-hook chpwd load-nvmrc |
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({ | |
| actions: { | |
| create() { | |
| this.get("store").createRecord("my-model", {title: "foo"}).save({bar: "baz"}); | |
| } | |
| }, | |
| appName:'Ember Twiddle' | |
| }); |
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({ | |
| actions: { | |
| foo() { | |
| alert("called"); | |
| } | |
| }, | |
| selection: [], | |
| appName:'Ember Twiddle' |
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
| d = new Date() | |
| >> Thu Dec 17 2015 14:15:47 GMT+0100 (CET) | |
| d.getYear() | |
| >> 115 |
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'; | |
| let i = 0; | |
| export default Ember.Controller.extend({ | |
| appName:'Ember Twiddle', | |
| myService: Ember.inject.service(), | |
| actions: { | |
| foo() { |