Skip to content

Instantly share code, notes, and snippets.

View ethanph5's full-sized avatar

Ethan Wu ethanph5

  • Habu Inc.
  • San Francisco, CA
View GitHub Profile
@ethanph5
ethanph5 / angular-bootstrap-multiselect.js
Last active October 26, 2016 21:20
AngularJS directive using bootstrap-multiselect, works on Chrome and FF.
// AngularJS: 1.3.15
// bootstrap-multiselect: 0.9.6
angular.module('yourApp')
.directive('yourDirective', function () {
return {
link: function (scope, element, attrs) {
element.multiselect({
buttonClass: 'btn',
buttonWidth: 'auto',
@ethanph5
ethanph5 / angular-bootstrap-multiselect.coffee
Last active March 1, 2017 22:17
AngularJS directive using bootstrap-multiselect that written in Coffeescript and with underscore.js
angular.module('appModule')
.directive 'appDirective', ->
($scope, elem, attr) ->
elem.multiselect
buttonClass : 'btn btn-small'
buttonWidth : '200px'
buttonContainer : '<div class="btn-group" />'
maxHeight : 200