A
A
Artur Kudashev2019-02-07 20:36:35
Python
Artur Kudashev, 2019-02-07 20:36:35

Why doesn't import work?

Hello, I decided to divide the program into modules and met with a problem. There are two files main.js and slider.js, the second one should be exported to the first one. Both are in the same folder.
main.js slider.js
import { Slider } from 'slider';

export class Slider {

}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Kuts, 2016-07-20
@novicheck

sorted(j[0][u'trati'])
since you need to sort by numerical values, the expression can be written as follows:
sorted([float(x[1:]) for x in j[0][u'trati']])

N
NiyazNA, 2019-02-07
@NiyazNA

If you write the way you do, then the module will be imported from the node_modules folder. Change to:
import { Slider } from './slider';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question