Krishnabm
Krishnabm

Reputation: 185

Importing rxjs modules the right way

I want to import of from rxjs on my Angular 8.2.3 project. However, I see that this is present in 2 locations -

import { of } from 'rxjs/observable/of';

import { of } from 'rxjs/internal/observable/of';

Which way do I go?

Upvotes: 0

Views: 389

Answers (1)

Adam Perea
Adam Perea

Reputation: 399

I would like to say, you can use directly:

import { of } from 'rxjs';

Else, you have to use

import { of } from 'rxjs/observable/of';

Upvotes: 1

Related Questions