Closed
Description
OS?
Mac OSX Sierra
Versions.
angular-cli: 1.0.0-beta.21
node: 6.9.1
os: darwin x64
Repro steps
ng new foo
Details
src/app/foo/index.ts
is created and represents a barrel for app.module.ts
and app.component.ts
This is referenced from src/app/main.ts
Removing the index.ts
file would only require one change in the app:
Before
// main.ts
import { AppModule } from './app/';
After
// main.ts
import { AppModule } from './app/app.module';
Reason:
- One less file is easier to read.
- One less concept to learn for the user (barrels)
- It only used in one place, so it is easy to code without the barrel
Metadata
Metadata
Assignees
Labels
No labels