You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was doing some comparison between 'schema form' and 'formly' and it dawned on me, it would be nice to use an existing Mongoose schema as the source for fields, validation, etc.
You are indeed correct, that is basically what needs to be done (using the OIM approach). I will mess around with this and see what I can come up with.
FWIW, this is a 'comparison' issue with the other tool as it is based on schema (it doesn't have Mongoose connection either so ... )
Yes, this is true. I started a branch a while ago in angular-formly core to add support but didn't have time to work on it. Obviously it'll be implemented a bit differently now, but here's the starting point: formly-js/angular-formly@14db781
There may be changes necessary to angular-formly to enable this, and that's fine. But I'd like it to be fairly minimal.
Activity
kentcdodds commentedon May 12, 2015
Totally, terrific example idea. Would probably be very similar to http://angular-formly.com/#/example/very-advanced/oim
mikeerickson commentedon May 12, 2015
You are indeed correct, that is basically what needs to be done (using the OIM approach). I will mess around with this and see what I can come up with.
FWIW, this is a 'comparison' issue with the other tool as it is based on schema (it doesn't have Mongoose connection either so ... )
kentcdodds commentedon May 12, 2015
I should note, that there's an entire repo already initialized to add json-schema support to angular-formly as a plugin: https://github.com/formly-js/angular-formly-json-schema
mikeerickson commentedon May 12, 2015
Fantastic, that looks yummy!
mikeerickson commentedon May 12, 2015
Can you please confirm contents of this repo? There are only two files (README and LICENSE) ??
kentcdodds commentedon May 12, 2015
Yes, this is true. I started a branch a while ago in angular-formly core to add support but didn't have time to work on it. Obviously it'll be implemented a bit differently now, but here's the starting point: formly-js/angular-formly@14db781
There may be changes necessary to angular-formly to enable this, and that's fine. But I'd like it to be fairly minimal.
mikeerickson commentedon May 12, 2015
Ahhhhh, misunderstood what you said.
kentcdodds commentedon May 12, 2015
Nah, I still want an example of doing something like this with mongoose :-)
mikeerickson commentedon May 12, 2015
Well, this I will do just that :)