Skip to content

Instantly share code, notes, and snippets.

@kumkanillam
Created January 23, 2017 02:24
Show Gist options
  • Save kumkanillam/4082f6a6a194fb8a2555526b1062ef42 to your computer and use it in GitHub Desktop.
Save kumkanillam/4082f6a6a194fb8a2555526b1062ef42 to your computer and use it in GitHub Desktop.
import Ember from 'ember';
export default Ember.Component.extend({
actions:{
updateTitle(){
this.sendAction('showDescription','new-value');
}
}
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
showDescription: function (params) {
this.set('model.selectedModule', params);
}
}
});
import Ember from 'ember';
export default Ember.Route.extend({
selectedModule: '',
model: function () {
return {
selectedModule: 'employeeModule'
};
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<div class="row">
{{sis-db-description-render idTitle=model.selectedModule showDescription="showDescription"}}
</div>
<br>
{{outlet}}
<br>
<br>
{{idTitle}}
<button {{action 'updateTitle'}}> UpdateTitle</button>
{{yield}}
{
"version": "0.11.0",
"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.10.2",
"ember-data": "2.11.0",
"ember-template-compiler": "2.10.2",
"ember-testing": "2.10.2"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment