Last active
September 22, 2016 17:22
-
-
Save scottmessinger/5e495e8b7e6cb9ec8d56400f7b2d72ff to your computer and use it in GitHub Desktop.
New Twiddle
This file contains 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({ | |
didRender(){ | |
console.log('didRender expensive-outline-item.hbs') | |
} | |
}); |
This file contains 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({ | |
didRender(){ | |
console.log('didRender expensive-outline.hbs') | |
} | |
}); |
This file contains 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'; | |
const {get, set} = Ember; | |
export default Ember.Component.extend({ | |
init(){ | |
this._super(...arguments) | |
set(this, "counter", 0) | |
}, | |
items: Ember.computed('val', function(){ | |
let arr = [] | |
for(let i=0; i<500; i++){ | |
arr.push({title: `Item Number ${i}`}) | |
} | |
return arr | |
}), | |
didRender(){ | |
console.log('didRender the-parent.hbs') | |
}, | |
actions: { | |
increment(){ | |
set(this, 'counter', get(this, 'counter') + 1) | |
}, | |
anAction(){} | |
} | |
}); |
This file contains 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 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
{ | |
"version": "0.10.5", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "beta", | |
"ember-data": "2.8.0", | |
"ember-template-compiler": "beta", | |
"ember-testing": "beta" | |
}, | |
"addons": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment