Skip to content

Instantly share code, notes, and snippets.

@Subtletree
Created July 22, 2017 00:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Subtletree/7f47f342162cb702499136e6552103a9 to your computer and use it in GitHub Desktop.
Save Subtletree/7f47f342162cb702499136e6552103a9 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
item: 'item',
actions: {
submitSpellingComponentAction(params, userEnteredAttempt) {
alert(`params: ${params} \nuserEnteredAttempt: ${userEnteredAttempt}`);
}
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{input type="text" id="attemptvalue" value=userEnteredAttempt class="form-control spellingattempt" placeholder="Listen and type the spelling of the word here ..."}}
<span class="input-group-btn">
<button class="btn btn-default" type="button" {{action 'submitSpellingComponentAction' item userEnteredAttempt}}>Go!</button>
</span>
{{userEnteredAttempt}}
{
"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