OM PRAKASH
OM PRAKASH

Reputation: 393

Is Barrel (index.ts) deprecated from Angular 6?

In Angular2, we made use of index.ts files extensively to make the import and export statements simpler.

Since we are upgrading to Angular6, getting a lot of circular dependency issues. The moment we remove or ignore these index.ts files, then all those dependency issues are getting resolved.

So we would like to know that, is Barrel (index.ts) no more used in Angular6?

If still getting used, then is there any changes, the way it was used before?

Upvotes: 0

Views: 1369

Answers (1)

SeleM
SeleM

Reputation: 9658

They are not deprecated, Just don't reference them from inside of the same directory means do not import a symbol from a barrel that export the current file, import from the file itself.

Upvotes: 4

Related Questions