Skip to content

Instantly share code, notes, and snippets.

@ragingprodigy
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ragingprodigy/e775a84c2d47220e1866 to your computer and use it in GitHub Desktop.
Save ragingprodigy/e775a84c2d47220e1866 to your computer and use it in GitHub Desktop.
AngularJS directive to use the jQuery Select2 plugin
app.directive 'selectPlugin', [ ->
{
restrict: 'A'
link: (scope, elem, attr) ->
angular.element(elem).select2 { placeholder: attr.selectPlugin }
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment