Skip to content

Instantly share code, notes, and snippets.

@leepfrog
Created June 21, 2016 23:02
Show Gist options
  • Save leepfrog/6d3bba577f4feae34ce4c0bcd262e865 to your computer and use it in GitHub Desktop.
Save leepfrog/6d3bba577f4feae34ce4c0bcd262e865 to your computer and use it in GitHub Desktop.
Form
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'form',
submit(event) {
event.preventDefault();
console.log(this.$().serializeArray());
}
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
<br>
<br>
form:
{{my-form}}
{{input name='filename'}}
<select name='something'>
<option value='one'>1</option>
<option value='two'>2</option>
</select>
<button>submit</button>
{
"version": "0.9.3",
"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.6.0",
"ember-data": "2.6.1",
"ember-template-compiler": "2.6.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment