Can I use a single dynamic form throughout my entire Angular application?
Is this considered a good practice?
I'm planning to create a simple CRUD application for products and users. I'd like to know if it's feasible to use the same form for adding/updating both users and products. Could someone please provide some guidance?
Asked
Active
Viewed 20 times
0

pragith98
- 23
- 6
-
theoretically speaking : "possible". You component that contains that form has a special html tag of its own. lets say: for food component, that should be:
. So if u want other component should have the form, just use the tag in html part. However, beware that you need to carefully design the form , so that other component's design doesn't break. – Frost Aug 11 '23 at 16:32 -
one way to do this is to nest through Users/Products model type and for each property type create its respective dynamic component form field. It can be done in this same component that takes in Object type and array of records if necessary. – saidutt Aug 12 '23 at 01:12