11
如果我運行此:爲什麼angular-cli創建組件/ shared/index.ts?
ng g component components/blogs
我得到
app
+--components
| +--blogs
| | +--shared
| | | +--index.ts // what's this for?
| | +--blogs.component.css
| | +--blogs.component.html
| | +--blogs.component.ts
| | +--blogs.component.spec.ts // unit tests!
| | +--index.ts
我明白了休息,但什麼是/blogs/shared/index.ts
呢?如果組件文件夾僅用於組件,爲什麼組件具有共享文件夾?
參見https://angular.io/docs/ts/latest/glossary.html#!#B –