Reputation: 161
In our project we are moving from Angular 2 RC4 to RC5.
Question is: with the introduction of ngModules, will the barrels (index files) become unnecessary? Or can you use both in parallel? how to use these 2 concepts?
Upvotes: 4
Views: 648
Reputation: 657721
Barrels are to simplify TypeScript imports and are optional.
They aren't recommended anymore by the Angular2 team because they often cause issues with circular dependencies and similar.
@NgModule()
s are Angular2 compilation units. @NgModule()
and are an entirely different and unrelated concept and mandatory.
Upvotes: 6