angular js directive that automatically generates input forms