Skip to content

Instantly share code, notes, and snippets.

View pjsvis's full-sized avatar

Peter John Smith pjsvis

  • Virtual Information Systems
  • Edinburgh
View GitHub Profile
angular.module('formComponents', [])
.directive('formInput', function() {
return {
restrict: 'E',
scope: {},
link: function(scope, element, attrs)
{
var type = attrs.type || 'text';
var required = attrs.hasOwnProperty('required') ? "required='required'" : "";
var htmlText = '<div class="control-group">' +