Skip to content

Instantly share code, notes, and snippets.

@Robdel12
Last active April 23, 2020 16:06
Show Gist options
  • Save Robdel12/278fcd6b13e8b9a06d09e7023f178496 to your computer and use it in GitHub Desktop.
Save Robdel12/278fcd6b13e8b9a06d09e7023f178496 to your computer and use it in GitHub Desktop.
Emberx-select
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Emberx-select demo',
xSelectValue: 'bob',
actions: {
setXSelect(value) {
this.set('xSelectValue', value);
}
}
});
<h1>Welcome to {{appName}}</h1>
{{#x-select value=xSelectValue action="setXSelect"}}
{{#x-option value="fred"}}Fred Flintstone{{/x-option}}
{{#x-option value="bob"}}Bob Newhart{{/x-option}}
{{/x-select}}
<p>x-select value: {{xSelectValue}}</p>
{
"version": "0.8.0",
"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.5.1",
"ember-data": "2.5.2",
"ember-template-compiler": "2.5.1"
},
"addons": {
"emberx-select": "2.1.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment