在一個部件,我可以通過導入它使用OnInit
:如何隱藏Angular 2功能模塊中組件的位置?
import { OnInit } from '@angular/core';
我並不需要知道OnInit
源的確切位置。 Angular/core有一種隱藏確切位置的方法。
我想創建一個包含接口「MyInterface的」功能模塊「一般」,並能夠在其他模塊中使用它通過導入它像
import { MyInterface } from 'general';
我應該怎麼做隱藏確切MyInterface的位置?一些索引文件?
聽起來像是你正在尋找https://stackoverflow.com/questions/37564906/what-are-all-the-index-ts-used-for –