项目作者: iKrishnaSahu

项目描述 :
This project creates dynamic form using JSON schema
高级语言: TypeScript
项目地址: git://github.com/iKrishnaSahu/dynamic-forms.git
创建时间: 2020-02-17T19:34:56Z
项目社区:https://github.com/iKrishnaSahu/dynamic-forms

开源协议:

下载


DynamicForms

The project is to demonstrate creation of dynamic form using JSON schema

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Sample JSON input

  1. [
  2. {
  3. stepName: 'Step 1',
  4. Controls: [
  5. {
  6. Field: 'First Name',
  7. Type: 'text',
  8. Required: true,
  9. Length: 30
  10. },
  11. {
  12. Field: 'Last Name',
  13. Type: 'text',
  14. Required: true,
  15. Length: 30
  16. },
  17. {
  18. Field: 'Address',
  19. Type: 'textarea',
  20. Required: true,
  21. Length: 300
  22. }
  23. ]
  24. },
  25. {
  26. stepName: 'Step 2',
  27. Controls: [
  28. {
  29. Field: 'Interested In?',
  30. Type: 'checkbox',
  31. Required: true,
  32. Options: ['Books', 'TV', 'Video games']
  33. }
  34. ]
  35. }
  36. ]