Questions tagged as 'ecmascript-6'

1
answer

Difference between two arrays with TypeScript or ES6

How can I get the difference between two Arrays of objects using TypeScript or ES6 ? I tried using SET : let arr1 = new Set(lista1); let arr2 = new Set(lista2); let difference = new Set( [arr1 ].filter(x...
asked by 29.07.2016 / 21:13
1
answer

Angular 2 base64 image how to use?

I have an "ERR_INVALID_URL" error and it does not load the image. Does anyone know how to solve it? My html and Ts are like this. //Aqui está vindo a url do servidor let a = value.params["dataBuffer"]; //Aqui estou convertendo o b...
asked by 02.10.2018 / 21:25
1
answer

Private method in JAVASCRIPT Class

How to define a private method in a JavaScript class to make the msg_privada method as private (not externally visible) without changing the notation pattern? The msg_privada method should only be accessed by the class...
asked by 10.09.2018 / 19:46
0
answers

What are JavaScript proxies?

I know that in version 5 of EcmaScript (ES6) they added the proxies. What are they? What is your main purpose?
asked by 22.08.2018 / 00:29
0
answers

For does not increment at the end of the loop

What I need is to get all the arrays that are returning to me, and separate them into groups of 5 and the rest into a separate group. In the example I'm going to paste, I have two arrays Array1 = [1,2,3,4,5,6], Array2 = [1,2,3] I need to a...
asked by 23.08.2018 / 19:06
0
answers

React Native Error

Someone could help me I received the following feedback Não esqueça de cancelar as notificações e agendar as notificações do dia seguinte quando o usuário terminar um quiz :thumbsup:. Você pode usar, por exemplo, o isQuestionAvaliable para tes...
asked by 12.08.2018 / 23:57
0
answers

How to do a setTimout but only when there is no action on the screen?

I want an idea, like I do a SetTimout only when the user stops moving the page. Example, I have 2 screens. One is the home screen and the other is the home screen. when a user logs on to the system he goes home, while he is moving nothing happen...
asked by 02.08.2018 / 16:32
0
answers

How to understand the data flow of a Promise in ES6?

I was studying the working of Promise in ES6 and came across a pseudo-code of implementing a simple Promise: class PromiseSimple { constructor(executionFunction) { this.promiseChain = []; this.onResolve = this.onResolve...
asked by 21.05.2018 / 19:33
1
answer

How does Symbol work in ES6?

In the new Javascript specification ECMAScript (ES6) was created a new primitive type called Symbol() what is its usefulness? / p>     
asked by 02.12.2015 / 20:41
2
answers

Angular 5 + Ionic 3: I can not send headers in API requests

I am consuming an API through a post method and need to send in the Authorization header. I'm doing the following: public post(resource, body, authorization = false): Observable<any> { const headers = new HttpHeaders(); headers....
asked by 22.03.2018 / 14:41