Skip to content

Instantly share code, notes, and snippets.

@i8ramin
Created June 26, 2013 20:00
Show Gist options
  • Save i8ramin/5871079 to your computer and use it in GitHub Desktop.
Save i8ramin/5871079 to your computer and use it in GitHub Desktop.
(function() {
'use strict';
angular.module('App').directive('tagsManager', function TagsManager() {
return {
restrict: 'A',
scope: false,
link: function (scope, element, attr) {
var hiddenInput = ???;
element.tagsManager();
hiddenInput.on('change', function (e) {
scope.$apply(function () {
scope.tags = hiddenInput.val();
});
});
}
};
});
})();
@baddriverdave
Copy link

You sir, are a ninja. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment