angular-form-gen icon indicating copy to clipboard operation
angular-form-gen copied to clipboard

How to call add method

Open RupenAnjaria opened this issue 9 years ago • 2 comments

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?

RupenAnjaria avatar Aug 08 '16 18:08 RupenAnjaria

    .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')
        );
    }])

CosticaPuntaru avatar Sep 01 '16 09:09 CosticaPuntaru

Thank you, will give it a try.

RupenAnjaria avatar Sep 01 '16 13:09 RupenAnjaria