简体   繁体   English

Barrel(index.ts)是否已从Angular 6中弃用?

[英]Is Barrel (index.ts) deprecated from Angular 6?

In Angular2, we made use of index.ts files extensively to make the import and export statements simpler. 在Angular2中,我们广泛使用index.ts文件来简化导入导出语句。

Since we are upgrading to Angular6 , getting a lot of circular dependency issues. 由于我们正在升级到Angular6 ,因此出现了很多循环依赖问题。 The moment we remove or ignore these index.ts files, then all those dependency issues are getting resolved. 从删除或忽略这些index.ts文件的那一刻起,所有这些依赖关系问题都将得到解决。

So we would like to know that, is Barrel (index.ts) no more used in Angular6? 因此,我们想知道, Angular6中不再使用Barrel(index.ts)了吗?

If still getting used, then is there any changes, the way it was used before? 如果仍在使用,那么是否有改变,如以前的使用方式?

它们不被弃用,只是不要从同一目录中引用它们,这意味着不要从导出当前文件的桶中导入符号,而从文件本身导入

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从index.ts导出和导入 - Export and import from index.ts TypeScript编译中缺少index.ts - index.ts is missing from the TypeScript compilation Ionic 3“遇到未定义的提供商! 通常这意味着你有一个循环依赖“可能是由于使用'桶'index.ts文件引起的 - Ionic 3 “Encountered undefined provider! Usually this means you have a circular dependencies” might be caused by using 'barrel' index.ts files 遇到未定义的提供者! 通常,这意味着您有说谎感。 这可能是由于使用“桶” index.ts文件引起的 - Encountered undefined provider! Usually this means you have cies. This might be caused by using 'barrel' index.ts files 遇到未定义的提供者! 通常这意味着你有一个循环依赖(可能是由使用“桶” index.ts 文件引起的 - Encountered undefined provider! Usually this means you have a circular dependencies (might be caused by using 'barrel' index.ts files 错误:遇到未定义的提供程序。 通常这意味着你有一个循环依赖(可能是由使用'桶' index.ts 文件引起的 - Error: Encountered undefined provider! Usually this means you have a circular dependencies (might be caused by using 'barrel' index.ts files “angular-bootstrap-md \ index.ts不是编译输出的一部分” - “angular-bootstrap-md\index.ts is not part of the compilation output” Angular2 - WebStorm 通过 index.ts 导入我的模块 - Angular2 - WebStorm import my modules by index.ts 未生成Index.ts - Index.ts not being generated 解决从index.ts发布到NPM的导出问题? - Resolving exports from of index.ts published to NPM?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM