Skip to content

Instantly share code, notes, and snippets.

@kumkanillam
Created March 21, 2017 05:08
Show Gist options
  • Save kumkanillam/2e20c81a0423b9ad17ed7453b828a7bf to your computer and use it in GitHub Desktop.
Save kumkanillam/2e20c81a0423b9ad17ed7453b828a7bf to your computer and use it in GitHub Desktop.
import Ember from 'ember';
export default Ember.Controller .extend({
selectedMonth: null,
monthValues: function() {
return [
{id: 1, name: "January"},
{id: 2, name: "February"},
{id: 3, name: "March"},
{id: 4, name: "April"},
{id: 5, name: "May"},
{id: 6, name: "June"},
{id: 7, name: "July"},
{id: 8, name: "August"},
{id: 9, name: "September"},
{id: 10, name: "October"},
{id: 11, name: "November"},
{id: 12, name: "December"}
];
}.property()
});
<h1>Welcome to {{appName}}</h1>
<br>
<div class="ibox-content">
<form>
<div class="row">
<div class="col-md-4" style="margin-top: 10px">
{{view "select"
id="months"
content=monthValues
selection=selectedMonth
optionValuePath="content.id"
optionLabelPath="content.name"
prompt="Select month..." }}
</div>
</div>
</form>
</div>
<br>
{{outlet}}
<br>
<br>
{
"version": "0.11.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": "1.13.13",
"ember-data": "2.11.0",
"ember-template-compiler": "1.13.13",
"ember-testing": "1.13.13"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment