'set tags vlaue in viewpage using web api for update purpose in angular
i am using mat-chips in add tags page ....i am using web api for view tags in node... i want to show dynamic tags inside that particular mat-chips fields using formcontrol in edit page...
it show [object object][object object] in that mat-chips filed.... how to show particular tag value inside that field
this is my response for tags:
{
"Code": "1",
"Message": "Success",
"Data": {
"medicineuses": [
{
"uses": "Fever"
},
{
"uses": "HeadAche"
}
]
}
}
this is my html :
<mat-chip *ngFor="let uses of addUses;let indx=index;" [selectable]="selectable" (removed)="remove(uses)">
{{uses.name}}
<button matChipRemove>
<mat-icon>cancel</mat-icon>
</button>
</mat-chip>
this is my component:
ngOnInit(): void {
this.medicineService.viewMedicine(this.router.snapshot.params['id']).subscribe(
(result)=>{
console.log(result);
this.editmedicineForm=new FormGroup({
medicineuses: new FormControl(result.Data['medicineuses']),
})
});
}
how to get array of values inside mat-chips like a tag....
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

