Questions tagged as 'ecmascript-6'

0
answers

Import modules on demand

I'm using a lib in my project and I load the components I use through the commonjs module system. The code looks like this: let echart = require('echarts/lib/echarts'); require('echarts/lib/chart/scatter'); require('echarts/lib/component/title...
asked by 24.02.2018 / 19:10
1
answer

Use imported js file in html in an ES6 application

I'm developing an ES6 application and doing build with Webpack. This application will be in a template that already imports jQuery via <script src...></script> . How would I do to import from this file, jQuery to use it in...
asked by 19.02.2018 / 12:31
0
answers

Error accessing object property in module

Well, I'm running some tests with JavaScript modules, unfortunately there's a type Uncaught TypeError error when trying to set the property, setOption, of the mychart object. This is passed as a parameter to a class that is in another module....
asked by 08.02.2018 / 04:59
1
answer

Use if in onPress event

I'm trying to use a if like this: <Button iconRight={{ name: 'search', type: 'font-awesome' }} title='BUSCAR' buttonStyle={{ marginTop: 15, borderRadius: 7, backgroundCo...
asked by 28.01.2018 / 21:41
1
answer

Modal does not return updated validation error result when submitting a request $ http ()

{"permission": true, "title": "ALUNO: aDSadaD", "question": "Deseja ativar este Aluno?", "usuario": { "id": "42247", "usuario": "alunoguten3360", "role": "student", "role_formatted": "Aluno", "nome": "aDSadaD", "options_r...
asked by 26.07.2017 / 15:29
0
answers

How do I use AddEventListener () in vueJs?

I'm doing a function of my project and I need to use the addEventListener() event but it's giving an error: excluirVariante:function(v){ console.log(this.$el.querySelector('#op_nao')); console.log(this.$el.querySelector(...
asked by 25.05.2017 / 14:37
1
answer

Dynamic Javascript Imports

Hello, I need to dynamically import the paths to the assets of an application, for example: var cliente = clienteX import ../../caminho/${cliente}/caminho/arquivo.less It will not be changed at runtime, it would just pull...
asked by 28.03.2017 / 15:42
0
answers

Transpiling ES6 to ES5 using babel

I have a package.json file configured to grab all js files from a directory and merge them into a new file, doing transpiling to ES5. However, it is just creating a new file and unifying all the js files from the specified directory. It is not c...
asked by 16.09.2016 / 16:52
2
answers

Javascript: How to get an array of objects inside a child from an array of objects

I have the following sample object: const empresa = { nome: 'Tal tal', endereco: 'taltaltal', groupos: [ { nome: 'taltaltal', codenome: 'tal', as: [ { nome: 'grupo a',...
asked by 05.09.2018 / 14:14
1
answer

Obfuscate Code JS ES6

What is the most appropriate way to obfuscate code created using JS ES6 for use inside the electronjs?     
asked by 29.06.2018 / 03:25