Skip to content

Instantly share code, notes, and snippets.

@amritha-v
Last active March 21, 2017 11:34
Show Gist options
  • Save amritha-v/9113d88586332f5cdef56911b92ccf27 to your computer and use it in GitHub Desktop.
Save amritha-v/9113d88586332f5cdef56911b92ccf27 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
testAction(appName, params = {name: "amri"} ) {
let params1 = {name: "testing"};
Ember.merge(params1, params);
this.set('testparam', params1.name);
}
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<button {{action "testAction" appName}}>test</button>{{testparam}}
<br>
{{outlet}}
<br>
<br>
{
"version": "0.11.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.11.0",
"ember-data": "2.11.0",
"ember-template-compiler": "2.11.0",
"ember-testing": "2.11.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment