Last active
November 13, 2017 14:44
-
-
Save wojciechb/0013158a9b79d3c9c9ec3020d3406b73 to your computer and use it in GitHub Desktop.
render
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({ | |
willRender() { | |
console.log('child will A'); | |
this._super(...arguments); | |
console.log('child will B'); | |
// | |
//alert('my-component-child willRender'); | |
}, | |
didRender() { | |
console.log('child did A'); | |
this._super(...arguments); | |
console.log('child did B'); | |
// alert('my-component-child didRender'); | |
}, | |
name: null, | |
actions: { | |
updateName() { | |
this.set('name', Math.random()); | |
} | |
} | |
}); |
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({ | |
willRender() { | |
console.log('parent will A'); | |
this._super(...arguments); | |
console.log('parent will B'); | |
//alert('my-component-parent willRender'); | |
}, | |
didRender() { | |
console.log('parent did A'); | |
this._super(...arguments); | |
console.log('parent did B'); | |
//a//lert('my-component-parent didRender'); | |
}, | |
actions: { | |
updateName() { | |
this.set('name', Math.random()); | |
} | |
} | |
}); |
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({ | |
willRender() { | |
console.log('my will A') | |
this._super(...arguments); | |
console.log('my will B') | |
// alert('my-component willRender'); | |
}, | |
didRender() { | |
console.log('my did A') | |
this._super(...arguments); | |
console.log('my did B') | |
//alert('my-component didRender'); | |
}, | |
}); |
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', | |
actions: { | |
updateRandom() { | |
this.set('random', Math.random()); | |
} | |
} | |
}); |
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.12.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.12.0", | |
"ember-template-compiler": "2.12.0", | |
"ember-testing": "2.12.0" | |
}, | |
"addons": { | |
"ember-data": "2.12.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment