Created
July 10, 2017 18:44
-
-
Save kumkanillam/68fede075956a5c364a03440b74bc437 to your computer and use it in GitHub Desktop.
testin double rendering
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({ | |
init() { | |
this._super(...arguments); | |
console.log("init from child"); | |
}, | |
//didUpdateAttrs will not be called for initial render | |
didUpdateAttrs() { | |
this._super(...arguments); | |
console.log("didUpdateAttrs from child"); | |
}, | |
didReceiveAttrs() { | |
this._super(...arguments); | |
console.log("didReceiveAttrs from child"); | |
//this.set('filterValue','Yay'); | |
this.sendAction('updateFilter','Yay'); | |
}, | |
//this will not be called for initial render | |
willUpdate() { | |
this._super(...arguments); | |
console.log("willUpdate from child"); | |
}, | |
willRender() { | |
this._super(...arguments); | |
console.log('willRender in child '); | |
}, | |
//this will not be called for initial render | |
didUpdate() { | |
this._super(...arguments); | |
console.log('didUpdate in child '); | |
}, | |
//this will not be called for re-render | |
didInsertElement() { | |
this._super(...arguments); | |
console.log('didInsertElement in child '); | |
}, | |
didRender() { | |
this._super(...arguments); | |
console.log('didRender from child '); | |
}, | |
willDestroyElement() { | |
this._super(...arguments); | |
console.log('willDestroyElement from child '); | |
}, | |
actions:{ | |
setRange(){ | |
console.log('setRange'); | |
this.sendAction('updateFilter','Changed'+new Date()); | |
//this.set('filterValue','Changed'+new Date()); | |
} | |
} | |
}); |
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({ | |
init() { | |
this._super(...arguments); | |
console.log("init from parent"); | |
}, | |
//didUpdateAttrs will not be called for initial render | |
didUpdateAttrs() { | |
this._super(...arguments); | |
console.log("didUpdateAttrs from parent"); | |
}, | |
didReceiveAttrs() { | |
this._super(...arguments); | |
console.log("didReceiveAttrs from parent"); | |
}, | |
//this will not be called for initial render | |
willUpdate() { | |
this._super(...arguments); | |
console.log("willUpdate from parent"); | |
}, | |
willRender() { | |
this._super(...arguments); | |
console.log('willRender in parent '); | |
}, | |
//this will not be called for initial render | |
didUpdate() { | |
this._super(...arguments); | |
console.log('didUpdate in parent '); | |
}, | |
//this will not be called for re-render | |
didInsertElement() { | |
this._super(...arguments); | |
console.log('didInsertElement in parent '); | |
}, | |
didRender() { | |
this._super(...arguments); | |
console.log('didRender from parent '); | |
}, | |
willDestroyElement() { | |
this._super(...arguments); | |
console.log('willDestroyElement from parent '); | |
}, | |
actions:{ | |
updateFilter(value){ | |
this.set('filterValue',value); | |
console.log(' Parent filterValue updated'); | |
} | |
} | |
}); |
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', | |
filter:{value:'test'}, | |
}); |
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
{ | |
"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