Last active
August 17, 2016 11:32
-
-
Save kumkanillam/22657e16f47562ca386bfed85939f1f3 to your computer and use it in GitHub Desktop.
Demo -Parent-Child-Component-interaction
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({ | |
didInsertElement(){ | |
this._super(...arguments); | |
console.log('didInsertElement in child-a'); | |
}, | |
didRender(){ | |
this._super(...arguments); | |
console.log('didRender in child-a'); | |
}, | |
actions:{ | |
changeAppName(){ | |
console.log('changeAppName in child-a'); | |
console.log(' child-a '+this.get('appName')); | |
this.sendAction('changeAppName'); | |
} | |
} | |
}); |
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({ | |
didInsertElement(){ | |
this._super(...arguments); | |
console.log('didInsertElement in parent-letters'); | |
}, | |
didRender(){ | |
this._super(...arguments); | |
console.log('didRender in parent-letters'); | |
} | |
}); |
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:{ | |
changeAppName(){ | |
console.log('changeAppName in controller '); | |
this.set('appName','Kumkan PlayGround'); | |
} | |
} | |
}); |
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.10.4", | |
"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.7.0", | |
"ember-data": "2.7.0", | |
"ember-template-compiler": "2.7.0" | |
}, | |
"addons": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment