How to load the form controls from JSON/NoSQL #45
Replies: 2 comments 1 reply
-
this will details better: I have a strange situation where i need to load all the control from a JSON / NoSql db(mongoDb). I have been playing around with the library. Its great work. I wanted to understand how do I load these parameter from JSON file to
] |
Beta Was this translation helpful? Give feedback.
-
Hi @amitnil-dev! myconfig.controls = json.data.map(
({ type, ...config }) => createMatConfig(type, config)
); you're always able to put some functions to process your incoming |
Beta Was this translation helpful? Give feedback.
-
How do i load controls from JSON file, say example
createMatConfig('INPUT', {
name: 'firstName',
options: { validators: ['required'] },
factory: { cssClass: 'col-sm-6 col-md-4' },
params: { label: 'First Name *' },
}),
I want to get all these from JSON and load the controls.
Beta Was this translation helpful? Give feedback.
All reactions