Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular API关于如何绑定类别对象、子类别对象和组类别对象数据的单个对象_Angular_Typescript - Fatal编程技术网

Angular API关于如何绑定类别对象、子类别对象和组类别对象数据的单个对象

Angular API关于如何绑定类别对象、子类别对象和组类别对象数据的单个对象,angular,typescript,Angular,Typescript,Angular API关于如何绑定类别对象、子类别对象和组类别对象数据的单个对象 let categoryObj = { 'campaign_id': this.data.campaignId, 'config_product_id': this.addProductObj.id, 'product_code': this.addProductObj.product_code, 'products_id': this.addProductObj.

Angular API关于如何绑定类别对象、子类别对象和组类别对象数据的单个对象

 let categoryObj = {
      'campaign_id': this.data.campaignId,
      'config_product_id': this.addProductObj.id,
      'product_code': this.addProductObj.product_code,
      'products_id': this.addProductObj.id
    }



是,工作正常感谢@Darshanwelcome@Jaypalsinh您可以根据您的数据更改名称…是,工作正常感谢@Darshanwelcome@Jaypalsinh您可以根据您的数据更改名称。。。
categoryGroupListData = [];
categoryListData = [];
subCategoryListData = [];

this.configProductCategoryForm = this.fb.group({
    'categoryGroupId': [data ? data.categoryGroupId : '', [Validators.required]],
    'categoryId': [data ? data.categoryId : '', [Validators.required]],
    'subCategoryId': [data ? data.subCategoryId : '', [Validators.required]],
});

 let catGroupDataObj = {
    configurable_product_id: id,
    category_group_id: value.categoryGroupId,
};
let catDataObj = {
    configurable_product_id: id,
    category_id: value.categoryId,
};
let subCatData = {
    configurable_product_id: id,
    sub_category_id: value.subCategoryId,
};
let MainData = {
    catGroupData: catGroupDataObj,
    catData: catDataObj,
    subCatData: subCatData
};

this.addConfigurableProductSaveCategory(MainData).subscribe((response: any) => { 
            });