Form generator for AngularJS
Customizable and extensible forms generator for AngularJS. License under MIT License.
{{form.data | json}}
{{form.errors | json}}
$ bower install -S angular-formus
<script src="/bower_components/angular-formus/dist/formus.min.js"></script>
var app = angular.module('app', ['formus',]);
var formsConfiguration = { firstForm: {/* Config */} };
app.constant('F_CONFIG', formsConfiguration);
app.config(['FormusContainerProvider','F_CONFIG', function(FCP, FC) {FCP.setContainer(FC);} ]);
app.controller('MainCtrl', function($scope, FormusContainer, FormusHelper, FORMS_CONFIG, $http) { var form = $scope.form = FormusContainer.get('firstForm'); $scope.src = FORMS_CONFIG.firstForm; form.config.buttons[0].handler = function() { $http.get('https://api.github.com/users').success(function(data) { form.fieldset.fields[4].items = FormusHelper.extractItems(data, 'id', 'login'); }); }; });
{{src | json}}