Questions tagged as 'typescript'

0
answers

How to access a typescript object?

I'm trying to access a database in firestore with this getAlldocuments : getAllDocuments(collection: string): Promise<any> { return new Promise((resolve, reject) => { this.db.collection(collection) .get(...
asked by 06.06.2018 / 16:12
1
answer

Several non-angular dependent requests

Hello, I'm doing an angular process, in the 'ngOnInit ()' method, where I need to perform 3 HTTP methods, which are asynchronous. one depends on the other's response. for example: 1st call: get a token 2nd call: it will only happen after t...
asked by 12.06.2018 / 16:07
1
answer

Collection "@ angular / material" can not be resolved

I'm starting with angular and I ended up with a very strange error when trying to execute the command: ng generate @angular/material:material-nav --name nav-menu It apprehends me the following satck: Collection "@angular/material" cannot...
asked by 27.06.2018 / 19:19
0
answers

Function with enum - TYPESCRIPT

I need to put a function into an enum in typescript as in the example below: export enum dataTableFunc{ 'edit'= teste() } function teste(event.button){ // } In this function that I am trying to pass to the enum still must receive one...
asked by 22.03.2018 / 22:30
1
answer

Angular FormGroup

Hello, I'm new to angular and would like to know how I use more of an external validation with FormGroup. Currently my code is as follows ... constructor(fb: FormBuilder, public router: Router){ //Grupo de formulario - Validações...
asked by 05.04.2018 / 19:24
1
answer

Pass variable in * ngIf

I have a variable in my input.component.ts called validacaoExterna , which gets a string from whoever uses it .. @Input() validacaoExterna: string; In my input.component.html I have a * ngIf that uses this variable *...
asked by 06.04.2018 / 16:01
0
answers

List the value of a Subscribe in Angular 2+

I have a component that connects to another sibling component. From that, I made a service so that it is possible to make this communication. So far so good. The problem is that I can not retrieve the subscribe values that are inside a compone...
asked by 13.04.2018 / 01:03
1
answer

Tansform a JSON response in a list and display the data on the screen with IONIC

Good afternoon everyone, whenever I have any doubts I run here in the hope that you help me and I always get positive answers, from now on thank you very much. Well, I have a little problem here (I do not have much affinity for typescript). I...
asked by 23.02.2018 / 16:59
0
answers

Error sending xml data

I have the following message: [{erro: "Formato de usuário inválido"}] Typescript code var headers = new Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded'); let urlSearchParams = new URLSearchParams(); urlS...
asked by 21.03.2018 / 19:19
0
answers

Create fields with ngFor

I want to do something where I can every time I click the button to make new fields. What I've done is this: <label for="">Contatos</label> <div *ngFor="let contato of contatos" class="row"> <div class="col-12 col-sm-...
asked by 15.02.2018 / 16:34