Skip to content

Instantly share code, notes, and snippets.

@Omnipresent
Last active December 21, 2015 14:39
Show Gist options
  • Save Omnipresent/6320883 to your computer and use it in GitHub Desktop.
Save Omnipresent/6320883 to your computer and use it in GitHub Desktop.
App.obj = Ember.Object.create({
"things": Ember.A(["Dog", "CAT", "Rat"])
});
App.ApplicationController = Ember.ArrayController.extend({
selectterm: null,
submit: function (context) {
var term = this.get("selectterm");
alert(term);
}
});
{{view Ember.TextField type="hidden" value="Request" valueBinding="selectterm"}}
{{#with App.obj}}
<ul class='dropdown-menu'>
{{#each things}}
<li> <a href="#" data-value="{{this}}">{{this}}</a></li>
{{/each}}
</ul>
{{/with}}
</ul>
<button class="btn" {{action "submit"}} > <i class="icon-search"></i></button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment