Last active
December 10, 2019 21:08
-
-
Save dhindurthy/28f0b758bf6a4700551aac04de221090 to your computer and use it in GitHub Desktop.
ember-component-interaction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
change(e){ | |
//alert(e.target.value); | |
this.set('value', e.target.value) | |
}, | |
actions:{ | |
didDrop(e){ | |
//this.send('change',e.target.value) | |
} | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import EmberObject, { computed } from '@ember/object'; | |
export default Ember.Component.extend({ | |
firstName:'', | |
lastName:'', | |
middleName:'', | |
genders:[ | |
{ name: 'Male' }, | |
{ name: 'Female' }, | |
{ name: 'Non-binary' } | |
], | |
titles:[ | |
{ name: 'Mr' }, | |
{ name: 'Ms' }, | |
{ name: 'They' } | |
], | |
genderDefault:computed('title', function() { | |
if(this.title==='Mr'){ | |
return "Male"; | |
} else if (this.title==='Ms'){ | |
return "Female"; | |
} else if (this.title==='They'){ | |
return "Non-binary"; | |
} | |
}) | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
change(e){ | |
//alert(e.target.value); | |
this.set('value', e.target.value) | |
}, | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
name: "" | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} | |
form { | |
height: 400px; | |
display: flex; | |
flex-direction: column; | |
justify-content: space-between; | |
} | |
label{ | |
display: block; | |
} | |
.names{ | |
display:flex; | |
justify-content:space-between | |
} | |
ul { | |
list-style: none; | |
} | |
input { | |
width: auto; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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", | |
"bootstrap":"https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css", | |
"ember": "3.4.3", | |
"ember-template-compiler": "3.4.3", | |
"ember-testing": "3.4.3" | |
}, | |
"addons": { | |
"ember-data": "3.4.2", | |
"ember-truth-helpers": "1.3.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment