Questions tagged as 'angular'

1
answer

Filter number of items with certain property

Good afternoon guys, I'm trying to filter the number of items in an array, which has a specific property and a certain value (in the case: 'status: Open') in my array, to insert into a summary type box in home with this format: Belowarethefi...
asked by 12.12.2018 / 17:44
1
answer

Problems with angular - NPM

When I give npm install to my project, it returns this error: gyp ERR! configure error gyp ERR! stack Error: unable to get local issuer certificate gyp ERR! stack at TLSSocket.<anonymous> (_tls_wrap.js:1103:38) gyp ERR! stack a...
asked by 12.12.2018 / 18:06
1
answer

Validate TypeScript file size

I have to validate the file size, which can not exceed 1024. How do I do this in TypeScript? verificar(){ debugger; let _this = this; document.getElementById("openModalVerificar").click(); let formData: FormData = new FormData(...
asked by 11.12.2018 / 13:43
1
answer

Angular 7: Give biding on an object that will receive a json from an HTTP GET

Let's say I have the typed object: x: Endereco public interface Endereco { rua: string; numero: number; } And I have a GET http that will feed this variable x. The problem is that in the request I get a json with the "neighborhood" par...
asked by 05.12.2018 / 17:51
1
answer

Function executing before the response of my request

In a modal I have a form with data that can be edited. If the user confirms the update the data is updated and then it will be forwarding the new page. But in this new page the information that appears is still old (before the update). If I give...
asked by 03.12.2018 / 18:20
1
answer

How to limit subscribe in just one loop

I need to display an alert every time my main component changes route, so I created the following script in my AppComponent : constructor(private router: Router) { router.events.subscribe((val) => { alert(val); });...
asked by 20.11.2018 / 20:24
1
answer

Function being executed before receiving the value in ngModel

I have the following checkbox: <mat-checkbox [(ngModel)]="anuncio.checkouCarimbo" (click)="checkouAnuncio()" name="checksegundoAnuncio" class="example-margin checkFoto"> </mat-checkbox> The function called by the checkbox wh...
asked by 23.11.2018 / 11:20
1
answer

How to get the specific data of a JSON with Angle 2x?

I have an answer that I transform into JSON this way: const resposta = JSON.stringify(response); console.log(resposta); Give me feedback on console.log like this: [{"nome":"Ramos Janones","email":"[email protected]...
asked by 28.11.2018 / 17:08
1
answer

Unselect Radio Button of Angular Material

Hello, I have a problem with Angular. I want my button select of the Material Angle to be unchecked when the next function is called, but I have no idea how to do it, could anyone help me ?. I'll put the codes here below. Function code unch...
asked by 07.11.2018 / 21:29
1
answer

Only render my element if it is not empty with * ngIf

I have the following variable: listAtributos: any[] = []; In my template I want to check if it is empty, if it is, do not show the content, if there is something inside it, show the contents of the div. I tried something like: <div...
asked by 08.11.2018 / 16:44