0
Watch this tutorial carefully:
Importing RXJS Observable functions in Angular 5
I’m having difficulty performing the Observable Resource Import timer, I’ve tried to write the path in several ways and I can’t care.
Look at the headline of my class!
I tried to install other versions of rxjs
I had the "rxjs": "5.1.0"
, but then I tried the version "rxjs": "^5.5.5"
and the version "rxjs": "^6.2.2"
, and unsuccessfully.
I really need help
In version 6+ it would be import { timer } from 'rxjs';
– Eduardo Vargas
I’m sorry, I didn’t understand what you said.
– wladyband
In the version of rxjs 6 or higher it would look like this: import { timer } from 'rxjs';
– Eduardo Vargas
@Eduardovargas sorry, but your suggestion did not take.
– wladyband
Delete Node modules and install everything dnv. Make sure you are using 6. It may be that your project is not configured correctly tbm. You used the angular cli to generate it?
– Eduardo Vargas
Your other Imports tbm are weird it was supposed to be @angular/animations and not have node_modules for example. You are using an absolute rather than relative pathing.
– Eduardo Vargas
I just solved, installed the version
"rxjs": "5.1.0"
and set that pathimport { Observable } from '../../../../node_modules/rxjs/rx';
and it worked.– wladyband
Strange to have node_modules in your Imports...
– Eduardo Vargas
Very strange. Ever thought of using only
import { Observable } from 'rxjs/rx;
? Doesn’t spoil anything?– mutlei