Skip to content

Instantly share code, notes, and snippets.

@pazhani6264
Last active June 13, 2019 06:40
Show Gist options
  • Save pazhani6264/03d4555950ff1d72c124182cf3709d8f to your computer and use it in GitHub Desktop.
Save pazhani6264/03d4555950ff1d72c124182cf3709d8f to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
actions:{
reg () {
var x = {};
x.name = this.get('name');
x.mobile = this.get('mobile');
x.email = this.get('email');
x.password = this.get('password');
this.set('my',JSON.stringify(x));
}
}
});
{{my}}
<br>
<br>
<form {{action 'reg' on="submit"}}>
<h1>Register Form</h1>
<div class="form-group">
<div class="label">Name</div>
{{input class="input-form" value=name type="text"}}
</div>
<div class="form-group">
<div class="label">Mobile</div>
{{input class="input-form" value=mobile type="text"}}
</div>
<div class="form-group">
<div class="label">Email</div>
{{input class="input-form" value=email type="text"}}
</div>
<div class="form-group">
<div class="label">Password</div>
{{input class="input-form" value=password type="text"}}
</div>
<div class="form-group">
<button type="submit" class="reg-button">Submit</button>
</div>
</form><br>
<br>
{
"version": "0.15.1",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js",
"ember": "3.4.3",
"ember-template-compiler": "3.4.3",
"ember-testing": "3.4.3"
},
"addons": {
"ember-data": "3.4.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment