我需要使用 Angular 2.0 从 JSON 动态创建一个带有控件的表单。
我对 Angular 2.0 和 Typescript 很陌生。我完全不知道从哪里开始开发。
任何帮助深表感谢。
下面是示例 JSON
"General": {
"None": [
{
"FieldName": "100",
"DisplayName": "Mapping Name",
"ClassSize": "col-sm-6 col-xs-12",
"Field": [
{
"ControlType": "TextBox",
"FieldClass": "col-sm-6 col-xs-12",
"Required": "True",
"MaxLength": "10",
"RegularExpression": ""
}
]
},
{
"FieldName": "101",
"DisplayName": "Select Target File Type",
"ClassSize": "col-sm-6 col-xs-12",
"Field": [
{
"ControlType": "Dropdown",
"FieldClass": "col-sm-6 col-xs-12",
"Required": "True",
"Options": [
{
"Description": "--Please select--",
"ID": 0
},
{
"Description": "Row Per Day",
"ID": 1
},
{
"Description": "Row Per Week",
"ID": 2
},
{
"Description": "Row Per Transaction",
"ID": 3
}
]
}
]
}
]
}