McNull / angular-form-gen

Design Bootstrap based form schemas for AngularJS in a drag and drop WYSIWYG environment.
MIT License
135 stars 81 forks source link

How to call add method #28

Open RupenAnjaria opened 7 years ago

RupenAnjaria commented 7 years ago

The source file (https://github.com/McNull/angular-form-gen/blob/master/src/angular-form-gen/angular-form-gen.js) has a reference to add function at line 55. Do anyone know how to call this function while using the the generated form?

CosticaPuntaru commented 7 years ago
    .config(['fgConfigProvider', 'FgField', function (fgConfigProvider, FgField) {

        var field = new FgField('Component', {
            displayName: 'component',
            value: void 0
        });
        fgConfigProvider.fields.add(
            field,
            'Components',
            require('./field.html'),
            require('./field-config.html')
        );
    }])
RupenAnjaria commented 7 years ago

Thank you, will give it a try.