Posts by António • 91 points
9 posts
-
1
votes1
answer63
viewsA: Ionic 3 Missing Localstorage
localStorage is not a safe place to store data. Data can be periodically erased by the operating system. The best solution is to use "Native Storage":…
-
0
votes1
answer33
viewsA: Repeated ID on objects in my array
As I understand it, they’re repeated because you keep adding to the same array without clearing it first. See if the following code solves your problem const novosAdicionados = [];…
-
0
votes1
answer139
viewsA: Previous request to then execute another request at the angle
You need to use an Httpinterceptor. For that you create a service of this kind: @Injector() export class RequestInterceptorService implements HttpInterceptor { intercept(request:…
-
0
votes4
answers2324
viewsA: Angular 7 - Popular object on return of API service. httpClient
The list in json is inside an object, so you cannot map that json directly to the Covers array[]. First you create the following class export class RootObject { sucess: boolean; message: string;…
-
0
votes1
answer194
viewsA: Recover data from localStorage to a list
Do const prod = localStorage.getItem('vetor'); if (prod != null) { this.vetCarrinho = JSON.parse(prod); } not enough? :) Attention that whenever you do localStorage.setItem("vetor",…
-
1
votes1
answer324
viewsA: IONIC - Grid Responsive
Assuming you want all columns of the same size, html should have the following format: <ion-grid> <ion-row> <ion-col col-3> Código </ion-col> <ion-col col-3> Nome…
-
0
votes1
answer98
viewsA: Iterate values of two requests in *ngFor
totalOrder is unique and you are recording three results in the same variable, which only makes you see the last result because you write over the other results. Trade your code for this:…
-
1
votes1
answer70
viewsA: Function running before my request response
Checks that the browser is not "caching" the request to the server. If it is, it will always return the same data, because the browser thinks you are asking for exactly the same information. If this…
-
3
votes2
answers1395
viewsA: How to pick up items from a json in c#
First you need to create an object with the json-like structure for Jsonconvert to know where to map objects. According to this JSON will be something of the kind public class RootObject { public…