Hii I am trying to save my HTML form data in the database. I create a JSON file for Dynamic fields and I bind it but there is some problem that's why data is not save. When I save the data, the same data is saved as it is in the JSON file as if I entered some string value in the input field, it is not saved but the original string is the same.
<div>
<p *ngFor="let item of doclist">
{{ item.label }}
<ejs-checkbox [(ngModel)]="item.value" id="item.value" name="item.value">
{{ item.value }}
</ejs-checkbox>
<ejs-textbox *ngIf="item.value == true && !false"[(ngModel)]="item.comment"
name="item.comment">
{{ item.comment }}
</ejs-textbox>
</p>
</div>
public doclist : {}[] = db;
public doc = JSON.stringify(this.doclist);
this.salesToOpsHand.documentList = this.doc;
`// documentList in that i have to save my all json string value so i write here doc values == documentList`
this is my db.json file
[
{
"name" : "IsSpecifications",
"label" : "isSpecifications() ",
"value" : false,
"type" : "checkbox",
"comment" : ""
},
{
"name" : "IsDrawSchedule",
"label" : "Drawings/Schedules ",
"value" : false,
"type" : "checkbox",
"comment" : ""
},
{
"name" : "TqRfi",
"label" : "TQ’s / RFI’s ",
"value" : false,
"type" : "checkbox",
"comment" : ""
},
{
"name" : "InsEnqReqQouInfor",
"label" : "Install Enquiry / request to quote information ",
"value" : false,
"type" : "checkbox",
"comment" : ""
},
{
"name" : "PanEnqReqQouInfor",
"label" : "Panel Enquiry / request to quote information ",
"value" : false,
"type" : "checkbox",
"comment" : ""
},
{
"name" : "PanSubContQuot",
"label" : "Panel Sub Contractor Quotation ",
"value" : false,
"type" : "checkbox",
"comment" : ""
},
{
"name" : "MccSchedule",
"label" : "MCC Schedules ",
"value" : false,
"type" : "checkbox",
"comment" : ""
},
{
"name" : "ScPackQuot",
"label" : "Other S/C Package Quotations ",
"value" : false,
"type" : "checkbox",
"comment" : ""
},
{
"name" : "OthrdPartyQuot",
"label" : "Other 3rd Party Quotations ",
"value" : false,
"type" : "checkbox",
"comment" : ""
},
{
"name" : "EquipSchedule",
"label" : "Equipment Schedules ",
"value" : false,
"type" : "checkbox",
"comment" : ""
},
{
"name" : "PointSchedul",
"label" : "Points Schedules ",
"value" : false,
"type" : "checkbox",
"comment" : ""
},
{
"name" : "ValveSchedul",
"label" : "Valve Schedules ",
"value" : false,
"type" : "checkbox",
"comment" : ""
},
{
"name" : "IdentRiskOpport",
"label" : "Identifed Risks and Opportunities (INCL. VALUE ENGINEERING) ",
"value" : false,
"type" : "checkbox",
"comment" : ""
},
{
"name" : "InstSubContQuot",
"label" : "Install Sub Contractor Quotation ",
"value" : false,
"type" : "checkbox",
"comment" : ""
}
]
`if someone knows where is am doing a mistake please help me
here I try angular and JSON file and save the value in form of a string in the server side`