Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
bootstrap select compoent
<!-- app/templates/components/bootstrap-input.hbs -->
<label for="{{inputId}}">{{label}}</label>
{{input value=value placeholder=placeholder elementId=inputId classNames="form-control"}}
import Ember from 'ember';
var _uid = 0;
function generateUID() {
return ++_uid;
export default Ember.Component.extend({
value: null,
classNames: ['form-group', 'bootstrap-input-component'],
inputId: Ember.computed(function() {
return `bootstrap-input-component-${generateUID()}`;
placeholder="Enter a name..."
{{bootstrap-input value=model.description
placeholder="Enter a description..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment