我使用的是最新的Angular CLI,我创建了一个自定义组件文件夹,它是所有组件的集合.
例如,TextInputComponent
有一个TextInputConfiguration
类,放在src/components/configurations.ts
中,在我使用它的src/app/home/addnewuser/add.user.component.ts
中有:
import {TextInputConfiguration} from "../../../components/configurations";
这很好,但随着我的应用程序越来越大,越来越深,../
个增加,我该如何处理?
之前,对于SystemJS,我会将路径配置为system.config.js
,如下所示:
System.config({
..
map : {'ng_custom_widgets':'components' },
packages : {'ng_custom_widgets':{main:'configurations.ts', defaultExtension: 'ts'},
)};
如何使用Angular CLI为webpack生成相同的内容?