Questions tagged as 'ecmascript-6'

0
answers

Difference between @ and ./ in import function

I would like to know the difference between the codes below: import module from '@module' import module from 'module' Recently I had a problem where I had to stop using import firebase from 'firebase' and put import firebase from '@f...
asked by 28.08.2018 / 16:49
0
answers

What is Arrow Function and when to use it? [duplicate]

I have a question, I am studying ES6, but I do not understand much what the Arrow Function replaces, I researched and saw what the function is this . I would like to know better with an example without and with Arrow Function, and to kn...
asked by 19.01.2018 / 23:46
0
answers

Define ion-radio as required

Good evening, I'm building a dynamic form using ionic2, but the multiple-choice components do not accept the required property how would I do this in ionic? The component that I'm trying to put the required property on is the...
asked by 23.05.2016 / 01:56
3
answers

THIS object in conflict between jQuery and ECMA6 class

How do I resolve the conflict between this of a jQuery loop performed within a method of a class in javascript (ECMA6)? Example, metodoUm loops using jQuery and for each iteration of the loop, calls metodoDois passing the...
asked by 06.08.2016 / 01:59
1
answer

Events of jQuery Vs. arrow functions?

When you run the following code: $("button").on("click", function(){ console.log("Meu valor é: " + $(this).val()); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><buttonv...
asked by 27.03.2018 / 03:01
1
answer

Using ES6 Proxies with ES6 Maps

I'm about a day and a half researching about Maps and Proxies to delve deeper into the issue of looking at arrays, objects, and so on. But I came across a problem, I can not use Proxy in Map. When it comes to an ordinary array, I can use Proxy w...
asked by 01.01.2017 / 20:17
1
answer

Object.freeze Javascript

How can I get a Object.freeze on just one object? Here's the example below where I create a , replicate a to b , freezo b , and try to re-assign a value to a . But it is no longer possible. Because? How d...
asked by 27.11.2017 / 14:43
1
answer

Is it possible to use let and var in the same for loop?

In the code below it would be interesting if I could define i as let and be able to keep pass as var, can you do that without declaring pass in a row above? const randPass = () => { for (var i = 0, pass = ""; i < 8; i++) { pa...
asked by 09.09.2017 / 19:54
1
answer

How to access a nested object in another object dynamically?

I have the following JSON { "Id":"ssjsjs", "Name":"STFksks S.A", "Alias":"STF jnsns S.A", "DocumentId":"010101", "Accounts":[ "hahadkjkjteste" ], "CountryCode":"BRA", "Country":"Brasil", "Address":{ "Post...
asked by 11.08.2017 / 16:35
1
answer

Use of reserved word "import" in javascript

Reading the Ghost code, CMS platform based on NodeJS I found a file with the following statement: import Ember from 'ember'; import Resolver from 'ember/resolver'; import loadInitializers from 'ember/load-initializers'; import 'ghost/utils/lin...
asked by 21.07.2015 / 19:29