How to get the data returned(back-end) after an Upload (form-data) request ends?

I have an upload method that monitor the progress. The upload works just fine, but at the end, my back-end sends me an object (register) of this file uploaded (id and etc.) I don’t know how to capture it. What pipe to use or what return type to change into. Any help? The content of… Read More How to get the data returned(back-end) after an Upload (form-data) request ends?

Type checking with an array in Typescript

I’m attempting to call the api = https://pokeapi.co/api/v2/type I wish to display the array in the data using the async pipe. I’m doing this via the html: <option *ngFor="let pokemonType of pokemonTypes$ | async" [value]="pokemonType.url">{{pokemonType.name | titlecase}}</option> I have a Filter interface for this: export interface Filter { name: string; url: string; } I have… Read More Type checking with an array in Typescript

Not all code paths return a value.ts(7030) angular

data:any; submit() { this.answersValue.forEach((x: { forms: any[]; }) => { this.data = { pluginconfigform: "pluginconfigform", answers: x.forms.map(y => { if (y.type != "description") { return { sectionItemCode: y.code, answer: y.answer }; } else { delete this.data.answers; } }) }; this.pushData(this.data); }); } could you let me know how to solve this error? ‘Not all code… Read More Not all code paths return a value.ts(7030) angular

how to filter duplicate strings in an array

I have a response from an API that comes in this style "0": { "id": 78, "fotos": ["78.0", null, null, null, null, null], "status": "A", "marcaJ": { "id": 12, "marca": "ROYAL CANIN" }, "item_linkWeb": { "id": 98, "emp_id": 1, "item_id": 78, "linkWeb_id": 72, "updated_at": "2021-10-07T18:35:14.000000Z", "ecommerce_id": 1662526, "coresJ": [ { "ecommerce_id": null, "cor": null, "hex":… Read More how to filter duplicate strings in an array

How to put a title in a drop down list?

The dropdownlist is white/empty. I would like to put a title for example Choose. illustration I tried adding <optgroup label="Choose">/ </optgroup> but I want the title to be in the input before that the user clicks on the dropdown. How to do this? <select [(ngModel)]="type" name="type" class="form-select" style="width: 10%"> <optgroup label="Choose "> <option value="Y">Yes</option> <option… Read More How to put a title in a drop down list?